mirror of
https://github.com/samsonjs/immich.git
synced 2026-04-27 15:07:45 +00: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:
parent
7211d80e5f
commit
b0e1a425b3
1 changed files with 5 additions and 0 deletions
|
|
@ -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);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue