Hello everyone, I’m using paging3 for a search and...
# android
y
Hello everyone, I’m using paging3 for a search and when the search query changes and a new paging is created, I’m kept at the current position because I think the new and old pagination share the same item. Did anyone had the same issue ? How did you resolve it ?
Copy code
searchQuery.flatMapLatest(::pagingUseCase)
    .distinctUntilChanged()
    .cachedIn(viewModelScope)
    .mapToPresentation()

viewModel.searchPaging.flowWithLifecycle(viewLifecycleOwner.lifecycle)
    .onEach(adapter::submitData)
    .launchIn(viewLifecycleOwner.lifecycleScope)
not kotlin but kotlin colored 2
stackoverflow 2
c
image.png
y
shouldn’t the chan be renamed kotlin then to avoid confusion
c
No.
You are in a workspace for Kotlin provided by JetBrains. Adding Kotlin to any channel here is redundant.
☝️ 1
y
But naming a channel android while you can’t talk android stuff might be even worse. I understand the rules and I’ll ask on another channel for my question. Thank you though