Hi 👋 Is there some way I could "await" when new PagingSource is finished loading after invalidation?
My use case is that I want to log something in viewModel when source is finished loading after being invalidated and I can't find a way to do this. The obvious way of doing this is check the actual UI where I collect this but I would like to do this separately from UI (in ViewModel)
l
Leo Delon
04/17/2023, 7:03 PM
you could pass the logger to your custom paging data source, or have any other kind of callback/observable
f
Filip Wiesner
04/18/2023, 6:59 AM
Yeah, that could work but seems like a hack rather than proper solution. I cannot be 100% sure that when paging source returns some data, the UI receives it immediately or at all.
Anyways, thanks for your suggestion