Browse Source

close #1667

renovate/androidx.fragment-fragment-ktx-1.x
Austin Huang 3 years ago
parent
commit
10bc98125c
No known key found for this signature in database GPG Key ID: 84C23AA04587A91F
  1. 6
      app/src/main/java/awais/instagrabber/fragments/main/ProfileFragment.kt

6
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)

Loading…
Cancel
Save