feat: anilist notifications

This commit is contained in:
rebelonion 2024-03-07 02:51:04 -06:00
parent e2eae6250b
commit 7ac679f927
15 changed files with 572 additions and 28 deletions

View file

@ -80,6 +80,8 @@ class HomeFragment : Fragment() {
binding.homeUserBg.loadImage(Anilist.bg)
binding.homeUserDataProgressBar.visibility = View.GONE
binding.homeNotificationDot.visibility = if (Anilist.unreadNotificationCount > 0) View.VISIBLE else View.GONE
binding.homeAnimeList.setOnClickListener {
ContextCompat.startActivity(
requireActivity(), Intent(requireActivity(), ListActivity::class.java)
@ -361,6 +363,8 @@ class HomeFragment : Fragment() {
override fun onResume() {
if (!model.loaded) Refresh.activity[1]!!.postValue(true)
if (_binding != null)
binding.homeNotificationDot.visibility = if (Anilist.unreadNotificationCount > 0) View.VISIBLE else View.GONE
super.onResume()
}
}