Skip to content

armgit / ente

Public Imported from GitHub
0

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

[auth] Ensure sortKey is always passed

Neeraj Gupta219e5590bcb1
diff --git a/auth/lib/ui/code_widget.dart b/auth/lib/ui/code_widget.dart
index 509060f3cd..0c311d3d9d 100644
--- a/auth/lib/ui/code_widget.dart
+++ b/auth/lib/ui/code_widget.dart
@@ -100,7 +100,7 @@ class _CodeWidgetState extends State<CodeWidget> {
@override
Widget build(BuildContext context) {
- ignorePin = widget.sortKey == null || widget.sortKey == CodeSortKey.manual;
+ ignorePin = widget.sortKey != null && widget.sortKey == CodeSortKey.manual;
final colorScheme = getEnteColorScheme(context);
if (isMaskingEnabled != PreferenceService.instance.shouldHideCodes()) {
isMaskingEnabled = PreferenceService.instance.shouldHideCodes();
diff --git a/auth/lib/ui/home_page.dart b/auth/lib/ui/home_page.dart
index 757c01679e..16136428ee 100644
--- a/auth/lib/ui/home_page.dart
+++ b/auth/lib/ui/home_page.dart
@@ -580,7 +580,7 @@ class _HomePageState extends State<HomePage> {
return ClipRect(
child: CodeWidget(
- key: ValueKey('${code.hashCode}_$newIndex'),
+ key: ValueKey('${code.hashCode}_$newIndex_${_codeSortKey ?? ""}'),
code,
isCompactMode: isCompactMode,
sortKey: _codeSortKey,
@@ -616,6 +616,7 @@ class _HomePageState extends State<HomePage> {
key: ValueKey('${codeState.hashCode}_$index'),
codeState,
isCompactMode: isCompactMode,
+ sortKey: _codeSortKey,
);
}),
itemCount: _filteredCodes.length,