π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
rename widgets and remove unnecessary code
ashilkn30b914cc5c61
diff --git a/lib/ui/viewer/search/result/go_to_map_widget.dart b/lib/ui/viewer/search/result/go_to_map_widget.dartindex e408417a86..728268c927 100644--- a/lib/ui/viewer/search/result/go_to_map_widget.dart+++ b/lib/ui/viewer/search/result/go_to_map_widget.dart@@ -5,19 +5,12 @@ import "package:photos/theme/ente_theme.dart";import "package:photos/ui/map/enable_map.dart";import "package:photos/ui/map/map_screen.dart";-class GoToMapWidget extends StatelessWidget {- const GoToMapWidget({super.key});+//Used for empty state of location section+class GoToMap extends StatelessWidget {+ const GoToMap({super.key});@overrideWidget build(BuildContext context) {- final textScaleFactor = MediaQuery.textScaleFactorOf(context);- late final double width;- if (textScaleFactor <= 1.0) {- width = 85.0;- } else {- width = 85.0 + ((textScaleFactor - 1.0) * 64);- }-return GestureDetector(onTap: () async {final bool result = await requestForMapEnable(context);diff --git a/lib/ui/viewer/search/search_section.dart b/lib/ui/viewer/search/search_section.dartindex 1cae1b3fab..e0a5c2897d 100644--- a/lib/ui/viewer/search/search_section.dart+++ b/lib/ui/viewer/search/search_section.dart@@ -149,7 +149,7 @@ class _SearchSectionState extends State<SearchSection> {widget.sectionType == SectionType.location? const Padding(padding: EdgeInsets.fromLTRB(8, 24, 8, 0),- child: GoToMapWidget(),+ child: GoToMap(),): const SizedBox.shrink(),],@@ -170,7 +170,7 @@ class SearchExampleRow extends StatelessWidget {//Cannot use listView.builder herefinal scrollableExamples = <Widget>[];if (sectionType == SectionType.location) {- scrollableExamples.add(const GoToMapWidget());+ scrollableExamples.add(const GoToMap());}examples.forEachIndexed((index, element) {scrollableExamples.add(diff --git a/lib/ui/viewer/search_tab/locations_section.dart b/lib/ui/viewer/search_tab/locations_section.dartindex 6eb31c5ec4..f2912dd015 100644--- a/lib/ui/viewer/search_tab/locations_section.dart+++ b/lib/ui/viewer/search_tab/locations_section.dart@@ -97,13 +97,13 @@ class _LocationsSectionState extends State<LocationsSection> {),const SizedBox(width: 8),const SearchSectionEmptyCTAIcon(SectionType.location),- const GoToMapWidget(),+ const GoToMap(),],),);} else {final recommendations = <Widget>[- const GoToMap2(),+ const GoToMapWithBG(),..._locationsSearchResults.map((locationSearchResult) =>LocationRecommendation(locationSearchResult),@@ -361,8 +361,9 @@ class LocationRecommendation extends StatelessWidget {}}-class GoToMap2 extends StatelessWidget {- const GoToMap2({super.key});+//Used for non-empty state of location section.+class GoToMapWithBG extends StatelessWidget {+ const GoToMapWithBG({super.key});@overrideWidget build(BuildContext context) {