Closed sereden closed 4 years ago
This sounds like a repro of https://issuetracker.google.com/issues/158048877, which had the underlying issue of suspend submitData not propagating cancellation properly.
This has since been fixed and will be released with alpha02 - would you be able try out the latest SNAPSHOT or when alpha02 releases and report back your result? Instructions for SNAPSHOT here: https://androidx.dev/ (it's just a maven repo).
Btw, I noticed that you forgot to call Flow<PagingData<T>>.cachedIn(viewModelScope)
in your ViewModel, which shouldn't be necessary, but it's important to call to prevent recollection from doing a bunch of unnecessary work.
In the future - the best way to report issues with the library is through our bug tracker: https://issuetracker.google.com/issues/new?component=413106&template=1096385
@dlam Thanks for your feedback and help. Yes, I've tried the latest snapshot and it works fine.
Hello!
I use library version
androidx.paging:paging-runtime:3.0.0-alpha01
I'm trying to implement a multi-page search using pages. The search string could be changed during typing. Also exists some statuses filters which could be changed. As a result, I faced a crash (Collecting from multiple PagingData concurrently is an illegal operation
) that it's not possible to replace data while the previous set is processing. And it looks like there is no way to stop processing or receive callback that processing has finishedSo basically my Fragment observes data from ViewModel:
ViewModel triggers repository:
Repository:
And SearchPagingSource
Is there a way to handle it somehow?