mirror of
https://github.com/immich-app/immich.git
synced 2025-07-09 03:04:16 -04:00
fix: error from pre-caching beyond total assets
This commit is contained in:
parent
74b2dafa58
commit
cdc2927d47
@ -184,7 +184,7 @@ class TimelineService {
|
||||
|
||||
// Pre-cache assets around the given index for asset viewer
|
||||
Future<void> preCacheAssets(int index) =>
|
||||
_mutex.run(() => _loadAssets(index, 5));
|
||||
_mutex.run(() => _loadAssets(index, math.min(5, totalAssets - index)));
|
||||
|
||||
BaseAsset getAsset(int index) {
|
||||
if (!hasRange(index, 1)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user