From 4832739ff827bee3193ae2238dfd4f731dbdcb46 Mon Sep 17 00:00:00 2001 From: laurenspriem Date: Tue, 24 Jun 2025 17:27:45 +0530 Subject: [PATCH] Fix reset of scroll position --- .../ui/viewer/search/result/people_section_all_page.dart | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mobile/lib/ui/viewer/search/result/people_section_all_page.dart b/mobile/lib/ui/viewer/search/result/people_section_all_page.dart index fa9559bbdd..de6c0a2526 100644 --- a/mobile/lib/ui/viewer/search/result/people_section_all_page.dart +++ b/mobile/lib/ui/viewer/search/result/people_section_all_page.dart @@ -336,6 +336,7 @@ class _PeopleSectionAllWidgetState extends State { final streamSubscriptions = []; bool _showingAllFaces = false; bool _isLoaded = false; + bool _isInitialLoad = true; bool get _showMoreLessOption => !widget.namedOnly && extraFaces.isNotEmpty; @@ -349,6 +350,7 @@ class _PeopleSectionAllWidgetState extends State { streamSubscriptions.add( stream.listen((event) async { setState(() { + _isInitialLoad = false; _isLoaded = false; sectionData = getResults(); }); @@ -413,7 +415,9 @@ class _PeopleSectionAllWidgetState extends State { return FutureBuilder>( future: sectionData, builder: (context, snapshot) { - if (!_isLoaded && snapshot.connectionState == ConnectionState.waiting) { + if (!_isLoaded && + snapshot.connectionState == ConnectionState.waiting && + _isInitialLoad) { return const Center(child: EnteLoadingWidget()); } else if (snapshot.hasError) { return const Center(child: Icon(Icons.error_outline_rounded));