From a709fd86657e1be7c5f7c7c2af6c2b8381d7be35 Mon Sep 17 00:00:00 2001 From: manu Date: Wed, 29 May 2024 09:29:37 +0200 Subject: [PATCH] fix: [ANDROAPP-6088] scroll to top when update list --- .../usescases/searchTrackEntity/listView/SearchTEList.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/main/java/org/dhis2/usescases/searchTrackEntity/listView/SearchTEList.kt b/app/src/main/java/org/dhis2/usescases/searchTrackEntity/listView/SearchTEList.kt index 0346a8ec12..0a35cda2e1 100644 --- a/app/src/main/java/org/dhis2/usescases/searchTrackEntity/listView/SearchTEList.kt +++ b/app/src/main/java/org/dhis2/usescases/searchTrackEntity/listView/SearchTEList.kt @@ -165,6 +165,11 @@ class SearchTEList : FragmentGlobalAbstract() { } } }) + lifecycleScope.launch { + liveAdapter.loadStateFlow.collectLatest { + scrollToPosition(0) + } + } }.also { recycler = it }