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..8afde97947 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 @@ -423,44 +423,7 @@ class _FileSelectionActionsWidgetState ), labelText: S.of(context).editLocation, icon: Icons.edit_location_alt_outlined, - onTap: () async { - await showBarModalBottomSheet( - shape: const RoundedRectangleBorder( - borderRadius: BorderRadius.vertical( - top: Radius.circular(5), - ), - ), - backgroundColor: getEnteColorScheme(context).backgroundElevated, - barrierColor: backdropFaintDark, - topControl: Stack( - alignment: Alignment.bottomCenter, - children: [ - // This container is for increasing the tap area - Container( - width: double.infinity, - height: 36, - color: Colors.transparent, - ), - Container( - height: 5, - width: 40, - decoration: const BoxDecoration( - color: backgroundElevated2Light, - borderRadius: BorderRadius.all( - Radius.circular(5), - ), - ), - ), - ], - ), - context: context, - builder: (context) { - return UpdateLocationDataWidget( - widget.selectedFiles.files.toList(), - ); - }, - ); - }, + onTap: _editLocation, ), ); } @@ -480,11 +443,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 +483,54 @@ class _FileSelectionActionsWidgetState return const SizedBox(); } + Future _editLocation() async { + await showBarModalBottomSheet( + shape: const RoundedRectangleBorder( + borderRadius: BorderRadius.vertical( + top: Radius.circular(5), + ), + ), + backgroundColor: getEnteColorScheme(context).backgroundElevated, + barrierColor: backdropFaintDark, + topControl: Stack( + alignment: Alignment.bottomCenter, + children: [ + // This container is for increasing the tap area + Container( + width: double.infinity, + height: 36, + color: Colors.transparent, + ), + Container( + height: 5, + width: 40, + decoration: const BoxDecoration( + color: backgroundElevated2Light, + borderRadius: BorderRadius.all( + Radius.circular(5), + ), + ), + ), + ], + ), + context: context, + builder: (context) { + return UpdateLocationDataWidget( + widget.selectedFiles.files.toList(), + ); + }, + ); + } + + Future _shareSelectedFiles() async { + shareSelected( + context, + shareButtonKey, + widget.selectedFiles.files.toList(), + ); + widget.selectedFiles.clearAll(); + } + Future _moveFiles() async { if (split.pendingUploads.isNotEmpty || split.ownedByOtherUsers.isNotEmpty) { widget.selectedFiles