Skip to content

armgit / ente

Public Imported from GitHub
0

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

Fix reset of scroll position

laurenspriem4832739ff827
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<PeopleSectionAllWidget> {
final streamSubscriptions = <StreamSubscription>[];
bool _showingAllFaces = false;
bool _isLoaded = false;
+ bool _isInitialLoad = true;
bool get _showMoreLessOption => !widget.namedOnly && extraFaces.isNotEmpty;
@@ -349,6 +350,7 @@ class _PeopleSectionAllWidgetState extends State<PeopleSectionAllWidget> {
streamSubscriptions.add(
stream.listen((event) async {
setState(() {
+ _isInitialLoad = false;
_isLoaded = false;
sectionData = getResults();
});
@@ -413,7 +415,9 @@ class _PeopleSectionAllWidgetState extends State<PeopleSectionAllWidget> {
return FutureBuilder<List<GenericSearchResult>>(
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));