mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
fix(library): Handle multiple header
This commit is contained in:
parent
00aa93d189
commit
8c5b54df5f
1 changed files with 5 additions and 3 deletions
|
@ -616,11 +616,13 @@ open class LibraryController(
|
|||
LibraryUpdateJob.updateFlow.onEach(::onUpdateManga).launchIn(viewScope)
|
||||
viewScope.launchUI {
|
||||
LibraryUpdateJob.isRunningFlow(view.context).collect {
|
||||
val holder = if (mAdapter != null) visibleHeaderHolder() else null
|
||||
val category = holder?.category ?: return@collect
|
||||
adapter.getHeaderPositions().forEach {
|
||||
val holder = (binding.libraryGridRecycler.recycler.findViewHolderForAdapterPosition(it) as? LibraryHeaderHolder) ?: return@forEach
|
||||
val category = holder.category ?: return@forEach
|
||||
holder.notifyStatus(LibraryUpdateJob.categoryInQueue(category.id), category)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
elevateAppBar =
|
||||
scrollViewWith(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue