fix: manga/anime page noti icon updating

This commit is contained in:
rebelonion 2024-03-20 14:29:52 -05:00
parent 3bbf9efe63
commit adb304f138
4 changed files with 22 additions and 0 deletions

View file

@ -200,6 +200,14 @@ class MangaPageAdapter : RecyclerView.Adapter<MangaPageAdapter.MangaPageViewHold
}
}
fun updateNotificationCount() {
if (this::binding.isInitialized) {
binding.mangaNotificationCount.visibility =
if (Anilist.unreadNotificationCount > 0) View.VISIBLE else View.GONE
binding.mangaNotificationCount.text = Anilist.unreadNotificationCount.toString()
}
}
inner class MangaPageViewHolder(val binding: ItemMangaPageBinding) :
RecyclerView.ViewHolder(binding.root)
}