Skip to content

armgit / ente

Public Imported from GitHub
0

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

Minor refractor

AmanRajSinghMourya87f04dbaa61f
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 0103dece2e..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,
),
);
}
@@ -520,6 +483,45 @@ class _FileSelectionActionsWidgetState
return const SizedBox();
}
+ Future<void> _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<void> _shareSelectedFiles() async {
shareSelected(
context,