mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
remove use of NotifyDataSetChanged in mangaDetails
This commit is contained in:
parent
44346048cb
commit
f32b85ab76
1 changed files with 2 additions and 4 deletions
|
@ -707,16 +707,14 @@ class MangaDetailsController :
|
|||
else binding.recycler.findViewHolderForAdapterPosition(0) as? MangaHeaderHolder
|
||||
}
|
||||
|
||||
@SuppressLint("NotifyDataSetChanged")
|
||||
fun updateHeader() {
|
||||
binding.swipeRefresh.isRefreshing = presenter.isLoading
|
||||
adapter?.setChapters(presenter.chapters)
|
||||
tabletAdapter?.notifyDataSetChanged()
|
||||
tabletAdapter?.notifyItemChanged(0)
|
||||
addMangaHeader()
|
||||
activity?.invalidateOptionsMenu()
|
||||
}
|
||||
|
||||
@SuppressLint("NotifyDataSetChanged")
|
||||
fun updateChapters(chapters: List<ChapterItem>) {
|
||||
view ?: return
|
||||
binding.swipeRefresh.isRefreshing = presenter.isLoading
|
||||
|
@ -724,7 +722,7 @@ class MangaDetailsController :
|
|||
launchUI { binding.swipeRefresh.isRefreshing = true }
|
||||
presenter.fetchChaptersFromSource()
|
||||
}
|
||||
tabletAdapter?.notifyDataSetChanged()
|
||||
tabletAdapter?.notifyItemChanged(0)
|
||||
adapter?.setChapters(chapters)
|
||||
addMangaHeader()
|
||||
colorToolbar(binding.recycler.canScrollVertically(-1))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue