Skip to content

armgit / ente

Public Imported from GitHub
0

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

Tweak UI for location tag widget in file info

Neeraj Guptaefcab9218555
diff --git a/mobile/apps/photos/lib/ui/components/buttons/chip_button_widget.dart b/mobile/apps/photos/lib/ui/components/buttons/chip_button_widget.dart
index 63b2294fc2..9da85d9875 100644
--- a/mobile/apps/photos/lib/ui/components/buttons/chip_button_widget.dart
+++ b/mobile/apps/photos/lib/ui/components/buttons/chip_button_widget.dart
@@ -5,12 +5,15 @@ import "package:photos/theme/ente_theme.dart";
class ChipButtonWidget extends StatelessWidget {
final String? label;
final IconData? leadingIcon;
+ final double iconSize;
final VoidCallback? onTap;
final bool noChips;
+
const ChipButtonWidget(
this.label, {
this.leadingIcon,
this.onTap,
+ this.iconSize = 16,
this.noChips = false,
super.key,
});
@@ -34,7 +37,7 @@ class ChipButtonWidget extends StatelessWidget {
leadingIcon != null
? Icon(
leadingIcon,
- size: 16,
+ size: iconSize,
)
: const SizedBox.shrink(),
if (label != null && leadingIcon != null)
diff --git a/mobile/apps/photos/lib/ui/viewer/file_details/location_tags_widget.dart b/mobile/apps/photos/lib/ui/viewer/file_details/location_tags_widget.dart
index a32d0a4ad3..f48ddaf0f0 100644
--- a/mobile/apps/photos/lib/ui/viewer/file_details/location_tags_widget.dart
+++ b/mobile/apps/photos/lib/ui/viewer/file_details/location_tags_widget.dart
@@ -36,7 +36,6 @@ class LocationTagsWidget extends StatefulWidget {
class _LocationTagsWidgetState extends State<LocationTagsWidget> {
String? title;
IconData? leadingIcon;
- bool? hasChipButtons;
late Future<List<Widget>> locationTagChips;
late StreamSubscription<LocationTagUpdatedEvent> _locTagUpdateListener;
VoidCallback? onTap;
@@ -73,7 +72,6 @@ class _LocationTagsWidgetState extends State<LocationTagsWidget> {
leadingIcon: leadingIcon ?? Icons.pin_drop_outlined,
title: title,
subtitleSection: locationTagChips,
- hasChipButtons: hasChipButtons ?? true,
onTap: onTap,
endSection: _loadedLocationTags
? InfoMap(widget.file)
@@ -111,7 +109,6 @@ class _LocationTagsWidgetState extends State<LocationTagsWidget> {
setState(() {
title = AppLocalizations.of(context).location;
leadingIcon = Icons.pin_drop_outlined;
- hasChipButtons = false;
onTap = null;
});
}
@@ -129,7 +126,6 @@ class _LocationTagsWidgetState extends State<LocationTagsWidget> {
setState(() {
title = AppLocalizations.of(context).location;
leadingIcon = Icons.pin_drop_outlined;
- hasChipButtons = true;
onTap = null;
});
}
@@ -151,7 +147,9 @@ class _LocationTagsWidgetState extends State<LocationTagsWidget> {
.toList();
result.add(
ChipButtonWidget(
- "+",
+ null,
+ leadingIcon: Icons.add,
+ iconSize: 15,
onTap: () => showAddLocationSheet(context, widget.file.location!),
),
);