Skip to content

armgit / ente

Public Imported from GitHub
0

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

Clear selectedFiles after share action

AmanRajSinghMouryabf644477dce6
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 548395a9c4..0103dece2e 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
@@ -480,11 +480,7 @@ class _FileSelectionActionsWidgetState
labelText: S.of(context).share,
icon: Icons.adaptive.share_outlined,
key: shareButtonKey,
- onTap: () => shareSelected(
- context,
- shareButtonKey,
- widget.selectedFiles.files.toList(),
- ),
+ onTap: _shareSelectedFiles,
),
);
}
@@ -524,6 +520,15 @@ class _FileSelectionActionsWidgetState
return const SizedBox();
}
+ Future<void> _shareSelectedFiles() async {
+ shareSelected(
+ context,
+ shareButtonKey,
+ widget.selectedFiles.files.toList(),
+ );
+ widget.selectedFiles.clearAll();
+ }
+
Future<void> _moveFiles() async {
if (split.pendingUploads.isNotEmpty || split.ownedByOtherUsers.isNotEmpty) {
widget.selectedFiles