feat: longclicklistener for AL profile now accessible everywhere (#228)

* feat: added longclicklistener for AL profile in AnimePageAdapter and MangaPageAdapter

* feat: add delete to smaller media bottom sheet
This commit is contained in:
ibo 2024-03-09 22:02:23 +01:00 committed by GitHub
parent 7504bb9081
commit 7f36eba709
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 80 additions and 14 deletions

View file

@ -26,6 +26,7 @@ import ani.dantotsu.media.CalendarActivity
import ani.dantotsu.media.GenreActivity
import ani.dantotsu.media.MediaAdaptor
import ani.dantotsu.media.SearchActivity
import ani.dantotsu.profile.ProfileActivity
import ani.dantotsu.px
import ani.dantotsu.setSafeOnClickListener
import ani.dantotsu.setSlideIn
@ -94,6 +95,15 @@ class AnimePageAdapter : RecyclerView.Adapter<AnimePageAdapter.AnimePageViewHold
SettingsDialogFragment.newInstance(SettingsDialogFragment.Companion.PageType.ANIME)
dialogFragment.show((it.context as AppCompatActivity).supportFragmentManager, "dialog")
}
binding.animeUserAvatar.setOnLongClickListener { view ->
ContextCompat.startActivity(
view.context,
Intent(view.context, ProfileActivity::class.java)
.putExtra("userId", Anilist.userid),null
)
false
}
binding.animeNotificationCount.visibility = if (Anilist.unreadNotificationCount > 0) View.VISIBLE else View.GONE
binding.animeNotificationCount.text = Anilist.unreadNotificationCount.toString()