Skip to content

armgit / ente

Public Imported from GitHub
0

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

remove option to revert location edits

ashilkn51422f81dbff
diff --git a/lib/services/files_service.dart b/lib/services/files_service.dart
index eb4eda36da..1d7772c11c 100644
--- a/lib/services/files_service.dart
+++ b/lib/services/files_service.dart
@@ -107,80 +107,37 @@ class FilesService {
final List<EnteFile> remoteFilesToUpdate = [];
final Map<int, Map<String, dynamic>> fileIDToUpdateMetadata = {};
- if (location == null) {
- final buttonResult = (await showActionSheet(
- context: context,
- body: "Revert to original location for all items?",
- buttons: [
- ButtonWidget(
- labelText: "Yes",
- buttonType: ButtonType.neutral,
- buttonSize: ButtonSize.large,
- shouldStickToDarkTheme: true,
- buttonAction: ButtonAction.first,
- shouldSurfaceExecutionStates: true,
- isInAlert: true,
- onTap: () async {
- await _editLocationData(
- uploadedFiles,
- fileIDToUpdateMetadata,
- remoteFilesToUpdate,
- location,
- );
- },
- ),
- ButtonWidget(
- labelText: S.of(context).cancel,
- buttonType: ButtonType.secondary,
- buttonSize: ButtonSize.large,
- shouldStickToDarkTheme: true,
- buttonAction: ButtonAction.cancel,
- isInAlert: true,
- ),
- ],
- ))!;
-
- if (buttonResult.action == ButtonAction.cancel) {
- return;
- }
- } else {
- final buttonResult = (await showActionSheet(
- context: context,
- body: "Change location of selected items?",
- bodyHighlight: "You can revert back to the original location anytime",
- buttons: [
- ButtonWidget(
- labelText: "Yes",
- buttonType: ButtonType.neutral,
- buttonSize: ButtonSize.large,
- shouldStickToDarkTheme: true,
- buttonAction: ButtonAction.first,
- shouldSurfaceExecutionStates: true,
- isInAlert: true,
- onTap: () async {
- await _editLocationData(
- uploadedFiles,
- fileIDToUpdateMetadata,
- remoteFilesToUpdate,
- location,
- );
- },
- ),
- ButtonWidget(
- labelText: S.of(context).cancel,
- buttonType: ButtonType.secondary,
- buttonSize: ButtonSize.large,
- shouldStickToDarkTheme: true,
- buttonAction: ButtonAction.cancel,
- isInAlert: true,
- ),
- ],
- ))!;
-
- if (buttonResult.action == ButtonAction.cancel) {
- return;
- }
- }
+ await showActionSheet(
+ context: context,
+ body: "Change location of selected items?",
+ buttons: [
+ ButtonWidget(
+ labelText: "Yes",
+ buttonType: ButtonType.neutral,
+ buttonSize: ButtonSize.large,
+ shouldStickToDarkTheme: true,
+ buttonAction: ButtonAction.first,
+ shouldSurfaceExecutionStates: true,
+ isInAlert: true,
+ onTap: () async {
+ await _editLocationData(
+ uploadedFiles,
+ fileIDToUpdateMetadata,
+ remoteFilesToUpdate,
+ location,
+ );
+ },
+ ),
+ ButtonWidget(
+ labelText: S.of(context).cancel,
+ buttonType: ButtonType.secondary,
+ buttonSize: ButtonSize.large,
+ shouldStickToDarkTheme: true,
+ buttonAction: ButtonAction.cancel,
+ isInAlert: true,
+ ),
+ ],
+ );
}
Future<void> _editLocationData(
diff --git a/lib/ui/viewer/location/update_location_data_widget.dart b/lib/ui/viewer/location/update_location_data_widget.dart
index c675856676..99dca3bfc3 100644
--- a/lib/ui/viewer/location/update_location_data_widget.dart
+++ b/lib/ui/viewer/location/update_location_data_widget.dart
@@ -69,18 +69,7 @@ class _UpdateLocationDataWidgetState extends State<UpdateLocationDataWidget> {
child: Column(
children: [
MapButton(
- icon: Icons.undo,
- onPressed: () async {
- await FilesService.instance
- .bulkEditLocationData(widget.files, null, context);
- Navigator.of(context).pop();
- },
- heroTag: "revert-to-og-location",
- ),
- MapButton(
- // icon: Icons.add_location_alt_outlined,
icon: Icons.check,
-
onPressed: () async {
await FilesService.instance.bulkEditLocationData(
widget.files,
@@ -89,7 +78,6 @@ class _UpdateLocationDataWidgetState extends State<UpdateLocationDataWidget> {
);
Navigator.of(context).pop();
},
-
heroTag: 'add-location',
),
const SizedBox(height: 16),