Skip to content

armgit / ente

Public Imported from GitHub
0

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

Update icon for Trash

vishnukvmd5c1b3886ed64
diff --git a/auth/lib/onboarding/view/common/tag_chip.dart b/auth/lib/onboarding/view/common/tag_chip.dart
index 613b463493..3a52126acb 100644
--- a/auth/lib/onboarding/view/common/tag_chip.dart
+++ b/auth/lib/onboarding/view/common/tag_chip.dart
@@ -10,6 +10,7 @@ class TagChip extends StatelessWidget {
final VoidCallback? onTap;
final TagChipState state;
final TagChipAction action;
+ final IconData? iconData;
const TagChip({
super.key,
@@ -17,11 +18,16 @@ class TagChip extends StatelessWidget {
this.state = TagChipState.unselected,
this.action = TagChipAction.none,
this.onTap,
+ this.iconData,
});
@override
Widget build(BuildContext context) {
final colorScheme = getEnteColorScheme(context);
+ final color = state == TagChipState.selected ||
+ Theme.of(context).brightness == Brightness.dark
+ ? Colors.white
+ : colorScheme.tagTextUnselectedColor;
return GestureDetector(
onTap: onTap,
@@ -51,15 +57,24 @@ class TagChip extends StatelessWidget {
data: MediaQuery.of(context).copyWith(
textScaler: const TextScaler.linear(1),
),
- child: Text(
- label,
- style: TextStyle(
- color: state == TagChipState.selected ||
- Theme.of(context).brightness == Brightness.dark
- ? Colors.white
- : colorScheme.tagTextUnselectedColor,
- fontSize: 14,
- ),
+ child: Row(
+ children: [
+ if (iconData != null) ...[
+ Icon(
+ iconData,
+ size: 16,
+ color: color,
+ ),
+ const SizedBox(width: 8),
+ ],
+ Text(
+ label,
+ style: TextStyle(
+ color: color,
+ fontSize: 14,
+ ),
+ ),
+ ],
),
),
if (state == TagChipState.selected &&
diff --git a/auth/lib/ui/home_page.dart b/auth/lib/ui/home_page.dart
index 7db6a3800f..476fe5b4dc 100644
--- a/auth/lib/ui/home_page.dart
+++ b/auth/lib/ui/home_page.dart
@@ -404,7 +404,7 @@ class _HomePageState extends State<HomePage> {
}
if (index == itemCount - 1 && hasTrashedCodes) {
return TagChip(
- label: 'πŸ—‘οΈ Trash',
+ label: 'Trash',
state: _isTrashOpen
? TagChipState.selected
: TagChipState.unselected,
@@ -414,6 +414,7 @@ class _HomePageState extends State<HomePage> {
setState(() {});
_applyFilteringAndRefresh();
},
+ iconData: Icons.delete,
);
}
return TagChip(