Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Fix file actions not appearing on first selection

ashilkn2cd82ecf6b40
diff --git a/mobile/apps/photos/lib/ui/viewer/actions/file_selection_actions_widget.dart b/mobile/apps/photos/lib/ui/viewer/actions/file_selection_actions_widget.dart
index c9c3d26cff..502f499215 100644
--- a/mobile/apps/photos/lib/ui/viewer/actions/file_selection_actions_widget.dart
+++ b/mobile/apps/photos/lib/ui/viewer/actions/file_selection_actions_widget.dart
@@ -92,6 +92,7 @@ class _FileSelectionActionsWidgetState
@override
void initState() {
+ super.initState();
//User ID will be null if the user is not logged in (links-in-app)
currentUserID = Configuration.instance.getUserID() ?? -1;
@@ -100,7 +101,10 @@ class _FileSelectionActionsWidgetState
collectionActions = CollectionActions(CollectionsService.instance);
isCollectionOwner =
widget.collection != null && widget.collection!.isOwner(currentUserID);
- super.initState();
+ // Sync initial state if files are already selected
+ if (widget.selectedFiles.files.isNotEmpty) {
+ _selectFileChangeListener();
+ }
}
@override