From 376b814093d6f93e099dafe25e5457e5c932e6e3 Mon Sep 17 00:00:00 2001 From: Austin Huang Date: Sat, 17 Jul 2021 20:59:05 -0400 Subject: [PATCH] fix profile menuitem's 1. https://t.me/barinsta_app/22543 2. https://redd.it/olszxt point 2 --- .../awais/instagrabber/fragments/main/ProfileFragment.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 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 d4a57f2b..49b169e0 100644 --- a/app/src/main/java/awais/instagrabber/fragments/main/ProfileFragment.kt +++ b/app/src/main/java/awais/instagrabber/fragments/main/ProfileFragment.kt @@ -385,6 +385,8 @@ class ProfileFragment : Fragment(), OnRefreshListener, ConfirmDialogFragmentCall backStackSavedStateResultLiveData?.observe(viewLifecycleOwner, backStackSavedStateObserver) } mainActivity.supportActionBar?.title = viewModel.username.value + val (currentUserData, profileData) = viewModel.currentUserProfileActionLiveData.value!! + setupOptionsMenuItems(currentUserData.data, profileData.data) } catch (e: Exception) { Log.e(TAG, "onResume: ", e) } @@ -654,10 +656,10 @@ class ProfileFragment : Fragment(), OnRefreshListener, ConfirmDialogFragmentCall restrictMenuItem?.setTitle(if (profile.friendshipStatus?.isRestricted == true) R.string.unrestrict else R.string.restrict) muteStoriesMenuItem?.isVisible = true - muteStoriesMenuItem?.setTitle(if (profile.friendshipStatus?.isMutingReel == true) R.string.mute_stories else R.string.unmute_stories) + muteStoriesMenuItem?.setTitle(if (profile.friendshipStatus?.isMutingReel == true) R.string.unmute_stories else R.string.mute_stories) mutePostsMenuItem?.isVisible = true - mutePostsMenuItem?.setTitle(if (profile.friendshipStatus?.muting == true) R.string.mute_posts else R.string.unmute_posts) + mutePostsMenuItem?.setTitle(if (profile.friendshipStatus?.muting == true) R.string.unmute_posts else R.string.mute_posts) chainingMenuItem?.isVisible = profile.hasChaining removeFollowerMenuItem?.isVisible = profile.friendshipStatus?.followedBy ?: false