Skip to content

armgit / ente

Public Imported from GitHub
0

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

Clean up unused map enable dialog code

anandbaburajanef428fd6c300
diff --git a/mobile/apps/photos/lib/l10n/intl_en.arb b/mobile/apps/photos/lib/l10n/intl_en.arb
index cdab0fdb0a..0e5fa5733e 100644
--- a/mobile/apps/photos/lib/l10n/intl_en.arb
+++ b/mobile/apps/photos/lib/l10n/intl_en.arb
@@ -1177,7 +1177,6 @@
"maps": "Maps",
"maps_privacy_notice": "Approximate coordinates will be sent to privacy conscious third parties like OpenStreetMaps to show the map and location.",
"enableMaps": "Enable Maps",
- "enableMapsDesc": "This will show your photos on a world map.\n\nThis map is hosted by Open Street Map, and the exact locations of your photos are never shared.\n\nYou can disable this feature anytime from Settings.",
"quickLinks": "Quick links",
"selectItemsToAdd": "Select items to add",
"addSelected": "Add selected",
diff --git a/mobile/apps/photos/lib/ui/map/enable_map.dart b/mobile/apps/photos/lib/ui/map/enable_map.dart
deleted file mode 100644
index 0fd2502634..0000000000
--- a/mobile/apps/photos/lib/ui/map/enable_map.dart
+++ /dev/null
@@ -1,51 +0,0 @@
-import "package:flutter/cupertino.dart";
-import "package:photos/generated/l10n.dart";
-import 'package:photos/models/button_result.dart';
-import "package:photos/service_locator.dart";
-import "package:photos/ui/components/buttons/button_widget.dart";
-import "package:photos/ui/components/dialog_widget.dart";
-import "package:photos/ui/components/models/button_type.dart";
-import "package:photos/ui/notification/toast.dart";
-
-Future<bool> requestForMapEnable(BuildContext context) async {
- if (flagService.mapEnabled) {
- return true;
- }
-
- final ButtonResult? result = await showDialogWidget(
- context: context,
- title: AppLocalizations.of(context).enableMaps,
- body: AppLocalizations.of(context).enableMapsDesc,
- isDismissible: true,
- buttons: [
- ButtonWidget(
- buttonType: ButtonType.primary,
- buttonAction: ButtonAction.first,
- labelText: AppLocalizations.of(context).enableMaps,
- isInAlert: true,
- onTap: () async {
- await flagService.setMapEnabled(true);
- },
- ),
- ButtonWidget(
- buttonType: ButtonType.secondary,
- buttonAction: ButtonAction.second,
- labelText: AppLocalizations.of(context).cancel,
- isInAlert: true,
- ),
- ],
- );
- if (result?.action == ButtonAction.first) {
- return true;
- }
- if (result?.action == ButtonAction.error) {
- showShortToast(context, AppLocalizations.of(context).somethingWentWrong);
- return false;
- }
- return false;
-}
-
-//For debugging.
-void disableMap() {
- flagService.setMapEnabled(false);
-}