diff --git a/auth/lib/ui/code_widget.dart b/auth/lib/ui/code_widget.dart index 8a09e4b0c3..f8247b9bff 100644 --- a/auth/lib/ui/code_widget.dart +++ b/auth/lib/ui/code_widget.dart @@ -118,23 +118,23 @@ class _CodeWidgetState extends State { return Stack( children: [ // if (isFavorite) - // Align( - // alignment: Alignment.topRight, - // child: Icon( - // Icons.star, - // color: colorScheme.pinnedBgColor, - // size: widget.isCompactMode ? 16 : 24, + // Align( + // alignment: Alignment.topRight, + // child: Icon( + // Icons.star, + // color: colorScheme.pinnedBgColor, + // size: widget.isCompactMode ? 16 : 24, + // ), + // // + // // child: CustomPaint( + // // painter: PinBgPainter( + // // color: colorScheme.pinnedBgColor, + // // ), + // // size: widget.isCompactMode + // // ? const Size(24, 24) + // // : const Size(39, 39), + // // ), // ), - // // - // // child: CustomPaint( - // // painter: PinBgPainter( - // // color: colorScheme.pinnedBgColor, - // // ), - // // size: widget.isCompactMode - // // ? const Size(24, 24) - // // : const Size(39, 39), - // // ), - // ), if (widget.code.isTrashed && kDebugMode) Align( alignment: Alignment.topLeft, @@ -180,10 +180,13 @@ class _CodeWidgetState extends State { if (widget.code.isPinned) ...[ Align( alignment: Alignment.topRight, - child: Icon( - Icons.star, - color: colorScheme.primary700.withOpacity(0.4), - size: widget.isCompactMode ? 16 : 24, + child: Padding( + padding: const EdgeInsets.only(top: 2, right: 2), + child: Icon( + Icons.star, + color: colorScheme.primary700.withOpacity(0.4), + size: widget.isCompactMode ? 12 : 20, + ), ), ), ], diff --git a/auth/lib/ui/home_page.dart b/auth/lib/ui/home_page.dart index e2192e7992..7249b74de1 100644 --- a/auth/lib/ui/home_page.dart +++ b/auth/lib/ui/home_page.dart @@ -263,6 +263,17 @@ class _HomePageState extends State { codes.sort((a, b) => a.display.position.compareTo(b.display.position)); break; } + if (sortKey != CodeSortKey.manual) { + // move pinned codes to the using + int insertIndex = 0; + for (int i = 0; i < codes.length; i++) { + if (codes[i].isPinned) { + final code = codes.removeAt(i); + codes.insert(insertIndex, code); + insertIndex++; + } + } + } } Future _redirectToScannerPage() async { @@ -500,7 +511,7 @@ class _HomePageState extends State { } if (index == 1 && hasFavouriteCodes) { return TagChip( - label: "", + label: context.l10n.fav, state: _isFavouriteOpen ? TagChipState.selected : TagChipState.unselected, @@ -511,7 +522,7 @@ class _HomePageState extends State { setState(() {}); _applyFilteringAndRefresh(); }, - iconData: Icons.star, + // iconData: Icons.star, ); } if (index == itemCount - 1 && hasTrashedCodes) { diff --git a/auth/pubspec.yaml b/auth/pubspec.yaml index df74700373..9fb0df9184 100644 --- a/auth/pubspec.yaml +++ b/auth/pubspec.yaml @@ -1,6 +1,6 @@ name: ente_auth description: ente two-factor authenticator -version: 4.1.2+412 +version: 4.1.3+413 publish_to: none environment: