mirror of
https://github.com/immich-app/immich.git
synced 2025-05-24 01:12:58 -04:00
fix(mobile): deletion of single assets (#15597)
fix: set asset in currentassetprovider on image load Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
parent
c0210bd6c0
commit
3c1fa22109
@ -262,6 +262,11 @@ class GalleryViewerPage extends HookConsumerWidget {
|
|||||||
|
|
||||||
PhotoViewGalleryPageOptions buildAsset(BuildContext context, int index) {
|
PhotoViewGalleryPageOptions buildAsset(BuildContext context, int index) {
|
||||||
var newAsset = loadAsset(index);
|
var newAsset = loadAsset(index);
|
||||||
|
|
||||||
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||||
|
ref.read(currentAssetProvider.notifier).set(newAsset);
|
||||||
|
});
|
||||||
|
|
||||||
final stackId = newAsset.stackId;
|
final stackId = newAsset.stackId;
|
||||||
if (stackId != null && currentIndex.value == index) {
|
if (stackId != null && currentIndex.value == index) {
|
||||||
final stackElements =
|
final stackElements =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user