Skip to content

armgit / ente

Public Imported from GitHub
0

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

[auth] Keep fav enteries at top for non-custom order

Neeraj Gupta6d9dbcb9528a
diff --git a/auth/lib/ui/home_page.dart b/auth/lib/ui/home_page.dart
index 14301214aa..7249b74de1 100644
--- a/auth/lib/ui/home_page.dart
+++ b/auth/lib/ui/home_page.dart
@@ -263,6 +263,17 @@ class _HomePageState extends State<HomePage> {
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<void> _redirectToScannerPage() async {