Skip to content

armgit / ente

Public Imported from GitHub
0

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

change name of file and widget used to update location data

ashilkna1d4873e88cc
diff --git a/lib/ui/viewer/file/file_details_widget.dart b/lib/ui/viewer/file/file_details_widget.dart
index da7485ae2b..92e080cf7a 100644
--- a/lib/ui/viewer/file/file_details_widget.dart
+++ b/lib/ui/viewer/file/file_details_widget.dart
@@ -24,7 +24,7 @@ import 'package:photos/ui/viewer/file_details/exif_item_widgets.dart';
import "package:photos/ui/viewer/file_details/file_properties_item_widget.dart";
import "package:photos/ui/viewer/file_details/location_tags_widget.dart";
import "package:photos/ui/viewer/file_details/objects_item_widget.dart";
-import 'package:photos/ui/viewer/location/add_location_data_widget.dart';
+import 'package:photos/ui/viewer/location/update_location_data_widget.dart';
import "package:photos/utils/exif_util.dart";
class FileDetailsWidget extends StatefulWidget {
@@ -188,7 +188,7 @@ class _FileDetailsWidgetState extends State<FileDetailsWidget> {
barrierColor: backdropFaintDark,
context: context,
builder: (context) {
- return const AddLocationDataWidget();
+ return UpdateLocationDataWidget([file]);
},
);
},
diff --git a/lib/ui/viewer/location/add_location_data_widget.dart b/lib/ui/viewer/location/update_location_data_widget.dart
similarity index 87%
rename from lib/ui/viewer/location/add_location_data_widget.dart
rename to lib/ui/viewer/location/update_location_data_widget.dart
index ffdf51d380..fe2377625c 100644
--- a/lib/ui/viewer/location/add_location_data_widget.dart
+++ b/lib/ui/viewer/location/update_location_data_widget.dart
@@ -1,17 +1,20 @@
import "package:flutter/material.dart";
import "package:flutter_map/flutter_map.dart";
import "package:latlong2/latlong.dart";
+import "package:photos/models/file/file.dart";
import "package:photos/ui/map/map_button.dart";
import "package:photos/ui/map/tile/layers.dart";
-class AddLocationDataWidget extends StatefulWidget {
- const AddLocationDataWidget({super.key});
+class UpdateLocationDataWidget extends StatefulWidget {
+ final List<EnteFile> files;
+ const UpdateLocationDataWidget(this.files, {super.key});
@override
- State<AddLocationDataWidget> createState() => _AddLocationDataWidgetState();
+ State<UpdateLocationDataWidget> createState() =>
+ _UpdateLocationDataWidgetState();
}
-class _AddLocationDataWidgetState extends State<AddLocationDataWidget> {
+class _UpdateLocationDataWidgetState extends State<UpdateLocationDataWidget> {
final MapController _mapController = MapController();
LatLng? selectedLocation;
ValueNotifier hasSelectedLocation = ValueNotifier(false);
@@ -24,7 +27,7 @@ class _AddLocationDataWidgetState extends State<AddLocationDataWidget> {
@override
void dispose() {
super.dispose();
-
+ hasSelectedLocation.dispose();
_mapController.dispose();
}
@@ -69,7 +72,7 @@ class _AddLocationDataWidgetState extends State<AddLocationDataWidget> {
icon: Icons.check,
onPressed: () {},
- heroTag: 'zoom-in',
+ heroTag: 'add-location',
),
const SizedBox(height: 16),
MapButton(