Hi :wave: Is there some way I could "await" when n...
# androidx
f
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
you could pass the logger to your custom paging data source, or have any other kind of callback/observable
f
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