Skip to content

armgit / ente

Public Imported from GitHub
0

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

Merge remote-tracking branch 'upstream/main' into tags_desktop

Neeraj Gupta28d48c0df52f
diff --cc mobile/apps/auth/lib/ui/home/add_tag_sheet.dart
index 06e36a12f8,a1b1621451..84c008588b
--- a/mobile/apps/auth/lib/ui/home/add_tag_sheet.dart
+++ b/mobile/apps/auth/lib/ui/home/add_tag_sheet.dart
@@@ -173,49 -172,48 +173,53 @@@ class _AddTagSheetState extends State<A
const SizedBox(height: 16),
SizedBox(
height: 80,
- child: ListView.separated(
- scrollDirection: Axis.horizontal,
- itemCount: widget.selectedCodes.length,
- separatorBuilder: (_, __) => const SizedBox(width: 16),
- itemBuilder: (context, index) {
- final code = widget.selectedCodes[index];
- final iconData = code.display.isCustomIcon
- ? code.display.iconID
- : code.issuer;
-
- return SizedBox(
- width: 60,
- child: Column(
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- Container(
- width: 50,
- height: 50,
- decoration: BoxDecoration(
- color: colorScheme.fillFaint.withValues(alpha: 0.02),
- borderRadius: BorderRadius.circular(8),
- ),
- child: Center(
- child: IconUtils.instance.getIcon(
- context,
- iconData.trim(),
- width: 28,
+ child: HorizontalScrollArea(
+ builder: (context, scrollController) => ListView.separated(
+ controller: scrollController,
+ scrollDirection: Axis.horizontal,
+ itemCount: widget.selectedCodes.length,
+ separatorBuilder: (_, __) => const SizedBox(width: 16),
+ itemBuilder: (context, index) {
+ final code = widget.selectedCodes[index];
+ final iconData = code.display.isCustomIcon
+ ? code.display.iconID
+ : code.issuer;
+
+ return SizedBox(
+ width: 60,
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Container(
+ width: 50,
+ height: 50,
+ decoration: BoxDecoration(
- color:
- colorScheme.fillFaint.withValues(alpha: 0.02),
++ color: colorScheme.fillFaint.withValues(
++ alpha: 0.02,
++ ),
+ borderRadius: BorderRadius.circular(8),
+ ),
+ child: Center(
- child: IconUtils.instance
- .getIcon(context, iconData.trim(), width: 28),
++ child: IconUtils.instance.getIcon(
++ context,
++ iconData.trim(),
++ width: 28,
++ ),
),
),
- ),
- const SizedBox(height: 8),
- Text(
- code.issuer,
- overflow: TextOverflow.ellipsis,
- style: textTheme.mini.copyWith(
- color: colorScheme.textMuted,
+ const SizedBox(height: 8),
+ Text(
+ code.issuer,
+ overflow: TextOverflow.ellipsis,
+ style: textTheme.mini.copyWith(
+ color: colorScheme.textMuted,
+ ),
),
- ),
- ],
- ),
- );
- },
+ ],
+ ),
+ );
+ },
+ ),
),
),
const SizedBox(height: 24),
diff --cc mobile/apps/auth/lib/ui/home_page.dart
index b932acf28b,a05b622c36..a5c7a8a173
--- a/mobile/apps/auth/lib/ui/home_page.dart
+++ b/mobile/apps/auth/lib/ui/home_page.dart
@@@ -1739,75 -1764,74 +1765,77 @@@ class _HomePageState extends State<Home
if (!anyCodeHasError) ...[
SizedBox(
height: 48,
- child: ListView.separated(
- scrollDirection: Axis.horizontal,
- padding: const EdgeInsets.symmetric(
- horizontal: 16,
- vertical: 2,
- ),
- separatorBuilder: (context, index) =>
- const SizedBox(width: 8),
- itemCount: itemCount,
- itemBuilder: (context, index) {
- if (showAllChip && index == 0) {
- return TagChip(
- label: l10n.all,
- state: selectedTag == "" && _isTrashOpen == false
- ? TagChipState.selected
- : TagChipState.unselected,
- onTap: () {
- _codeDisplayStore.clearSelection();
- selectedTag = "";
- _isTrashOpen = false;
-
- setState(() {});
- _applyFilteringAndRefresh();
- },
- );
- }
+ child: HorizontalScrollArea(
+ builder: (context, scrollController) => ListView.separated(
+ controller: scrollController,
+ scrollDirection: Axis.horizontal,
- padding:
- const EdgeInsets.symmetric(horizontal: 16, vertical: 2),
++ padding: const EdgeInsets.symmetric(
++ horizontal: 16,
++ vertical: 2,
++ ),
+ separatorBuilder: (context, index) =>
+ const SizedBox(width: 8),
+ itemCount: itemCount,
+ itemBuilder: (context, index) {
+ if (showAllChip && index == 0) {
+ return TagChip(
+ label: l10n.all,
+ state: selectedTag == "" && _isTrashOpen == false
+ ? TagChipState.selected
+ : TagChipState.unselected,
+ onTap: () {
+ _codeDisplayStore.clearSelection();
+ selectedTag = "";
+ _isTrashOpen = false;
- if (showTrashChip && index == itemCount - 1) {
- return TagChip(
- label: l10n.trash,
- state: _isTrashOpen
- ? TagChipState.selected
- : TagChipState.unselected,
- onTap: () {
- _codeDisplayStore.clearSelection();
- selectedTag = "";
- _isTrashOpen = !_isTrashOpen;
- setState(() {});
- _applyFilteringAndRefresh();
- },
- iconData: Icons.delete,
- );
- }
- final customTagIndex = index - (showAllChip ? 1 : 0);
- if (customTagIndex >= 0 && customTagIndex < tags.length) {
- return TagChip(
- label: tags[customTagIndex],
- action: TagChipAction.menu,
- state: selectedTag == tags[customTagIndex]
- ? TagChipState.selected
- : TagChipState.unselected,
- onTap: () {
- _codeDisplayStore.clearSelection();
- _isTrashOpen = false;
- if (selectedTag == tags[customTagIndex]) {
+ setState(() {});
+ _applyFilteringAndRefresh();
+ },
+ );
+ }
+
+ if (showTrashChip && index == itemCount - 1) {
+ return TagChip(
+ label: l10n.trash,
+ state: _isTrashOpen
+ ? TagChipState.selected
+ : TagChipState.unselected,
+ onTap: () {
+ _codeDisplayStore.clearSelection();
selectedTag = "";
+ _isTrashOpen = !_isTrashOpen;
setState(() {});
_applyFilteringAndRefresh();
- return;
- }
- selectedTag = tags[customTagIndex];
- setState(() {});
- _applyFilteringAndRefresh();
- },
- );
- }
- return const SizedBox.shrink();
- },
+ },
+ iconData: Icons.delete,
+ );
+ }
+ final customTagIndex = index - (showAllChip ? 1 : 0);
+ if (customTagIndex >= 0 && customTagIndex < tags.length) {
+ return TagChip(
+ label: tags[customTagIndex],
+ action: TagChipAction.menu,
+ state: selectedTag == tags[customTagIndex]
+ ? TagChipState.selected
+ : TagChipState.unselected,
+ onTap: () {
+ _codeDisplayStore.clearSelection();
+ _isTrashOpen = false;
+ if (selectedTag == tags[customTagIndex]) {
+ selectedTag = "";
+ setState(() {});
+ _applyFilteringAndRefresh();
+ return;
+ }
+ selectedTag = tags[customTagIndex];
+ setState(() {});
+ _applyFilteringAndRefresh();
+ },
+ );
+ }
+ return const SizedBox.shrink();
+ },
+ ),
),
),
const SizedBox(height: 8),