From 10bc98125c93987179b336d73bf624cb4bfc8d1b Mon Sep 17 00:00:00 2001 From: Austin Huang Date: Sat, 17 Jul 2021 13:59:36 -0400 Subject: [PATCH] close #1667 --- .../awais/instagrabber/fragments/main/ProfileFragment.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/awais/instagrabber/fragments/main/ProfileFragment.kt b/app/src/main/java/awais/instagrabber/fragments/main/ProfileFragment.kt index 4df1675f..d4a57f2b 100644 --- a/app/src/main/java/awais/instagrabber/fragments/main/ProfileFragment.kt +++ b/app/src/main/java/awais/instagrabber/fragments/main/ProfileFragment.kt @@ -477,7 +477,7 @@ class ProfileFragment : Fragment(), OnRefreshListener, ConfirmDialogFragmentCall setupFavChip(profile, currentUser) setupFavButton(currentUser, profile) setupSavedButton(currentUser, profile) - setupTaggedButton(currentUser, profile) + setupTaggedButton(profile) setupLikedButton(currentUser, profile) setupDMButton(currentUser, profile) if (profile == null) return@observe @@ -755,8 +755,8 @@ class ProfileFragment : Fragment(), OnRefreshListener, ConfirmDialogFragmentCall } } - private fun setupTaggedButton(currentUser: User?, profile: User?) { - val visibility = if (currentUser != null && profile?.pk == currentUser.pk) View.VISIBLE else View.GONE + private fun setupTaggedButton(profile: User?) { + val visibility = if (profile?.usertagsCount == 0L) View.GONE else View.VISIBLE binding.header.btnTagged.visibility = visibility if (visibility == View.GONE) { binding.header.btnTagged.setOnClickListener(null)