Vincent tiensi
11/05/2020, 9:26 PMLazyColumn
with pager.flow.collectAsLazyPagingItems
? Right now in order to save both state and items I’ve been lifting out the collectAsLazyPagingItems
output and storing it directly in the fragment since I can only call this method in a @composable and the queried list item data is nested into the PagePresenter.if (pagingItems == null) {
pagingItems = collectAsLazyPagingItems()
}
So that I have access to it when the fragment is returned off the backstack.Andrey Kulikov
11/05/2020, 10:00 PMVincent tiensi
11/06/2020, 1:02 AMPager.flow.collectAsLazyPagingItems
is not maintained across screens. I followed the same code as this CL https://android-review.googlesource.com/c/platform/frameworks/support/+/1428676/17/compose/paging/paging/samples/src/main/java/androidx/compose/paging/samples/PagingSample.kt#118Andrey Kulikov
11/06/2020, 11:10 AMJoost Klitsie
11/06/2020, 11:39 AMAndrey Kulikov
11/06/2020, 11:50 AMallan.conda
11/10/2020, 8:30 AM