π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
fix: new state not reflecting on UI of search tab when syncing is complete
ashilknf62531391256
diff --git a/lib/states/all_sections_examples_state.dart b/lib/states/all_sections_examples_state.dartindex 4643cba819..18af96c035 100644--- a/lib/states/all_sections_examples_state.dart+++ b/lib/states/all_sections_examples_state.dart@@ -21,7 +21,6 @@ class _AllSectionsExamplesProviderStateextends State<AllSectionsExamplesProvider> {Future<List<List<SearchResult>>> allSectionsExamplesFuture = Future.value([]);- final allSectionsExamples = <Future<List<SearchResult>>>[];late StreamSubscription<SyncStatusUpdate> _syncStatusSubscription;@overridevoid initState() {@@ -31,7 +30,6 @@ class _AllSectionsExamplesProviderStateBus.instance.on<SyncStatusUpdate>().listen((event) {if (event.status == SyncStatus.completedBackup) {setState(() {- allSectionsExamples.clear();aggregateSectionsExamples();});}@@ -43,6 +41,7 @@ class _AllSectionsExamplesProviderState}void aggregateSectionsExamples() {+ final allSectionsExamples = <Future<List<SearchResult>>>[];for (SectionType sectionType in SectionType.values) {if (sectionType == SectionType.face ||sectionType == SectionType.content) {diff --git a/lib/ui/viewer/search/search_section.dart b/lib/ui/viewer/search/search_section.dartindex 5e7de5e9b3..de15c133d2 100644--- a/lib/ui/viewer/search/search_section.dart+++ b/lib/ui/viewer/search/search_section.dart@@ -62,6 +62,12 @@ class _SearchSectionState extends State<SearchSection> {super.dispose();}+ @override+ void didUpdateWidget(covariant SearchSection oldWidget) {+ super.didUpdateWidget(oldWidget);+ _examples = widget.examples;+ }+@overrideWidget build(BuildContext context) {debugPrint("Building section for ${widget.sectionType.name}");@@ -82,7 +88,7 @@ class _SearchSectionState extends State<SearchSection> {style: textTheme.largeBold,),),- widget.examples.length < (widget.limit - 1)+ _examples.length < (widget.limit - 1)? const SizedBox.shrink(): GestureDetector(onTap: () {