mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
fix(mobile): jump to previous asset when last asset is deleted (#25563)
* fix(mobile): fix wrong index, update pageController * fix(mobile): refactor code --------- Co-authored-by: Peter Ombodi <peter.ombodi@gmail.com> Co-authored-by: shenlong <139912620+shenlong-tanwen@users.noreply.github.com>
This commit is contained in:
@@ -469,6 +469,11 @@ class _AssetViewerState extends ConsumerState<AssetViewer> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (index >= totalAssets) {
|
||||||
|
index = totalAssets - 1;
|
||||||
|
pageController.jumpToPage(index);
|
||||||
|
}
|
||||||
|
|
||||||
if (assetReloadRequested) {
|
if (assetReloadRequested) {
|
||||||
assetReloadRequested = false;
|
assetReloadRequested = false;
|
||||||
_onAssetReloadEvent(index);
|
_onAssetReloadEvent(index);
|
||||||
|
|||||||
Reference in New Issue
Block a user