mirror of
https://github.com/KokaKiwi/BarInsta
synced 2024-11-22 06:37:30 +00:00
fix profile menuitem's
1. https://t.me/barinsta_app/22543 2. https://redd.it/olszxt point 2
This commit is contained in:
parent
10bc98125c
commit
376b814093
@ -385,6 +385,8 @@ class ProfileFragment : Fragment(), OnRefreshListener, ConfirmDialogFragmentCall
|
|||||||
backStackSavedStateResultLiveData?.observe(viewLifecycleOwner, backStackSavedStateObserver)
|
backStackSavedStateResultLiveData?.observe(viewLifecycleOwner, backStackSavedStateObserver)
|
||||||
}
|
}
|
||||||
mainActivity.supportActionBar?.title = viewModel.username.value
|
mainActivity.supportActionBar?.title = viewModel.username.value
|
||||||
|
val (currentUserData, profileData) = viewModel.currentUserProfileActionLiveData.value!!
|
||||||
|
setupOptionsMenuItems(currentUserData.data, profileData.data)
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
Log.e(TAG, "onResume: ", e)
|
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)
|
restrictMenuItem?.setTitle(if (profile.friendshipStatus?.isRestricted == true) R.string.unrestrict else R.string.restrict)
|
||||||
|
|
||||||
muteStoriesMenuItem?.isVisible = true
|
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?.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
|
chainingMenuItem?.isVisible = profile.hasChaining
|
||||||
removeFollowerMenuItem?.isVisible = profile.friendshipStatus?.followedBy ?: false
|
removeFollowerMenuItem?.isVisible = profile.friendshipStatus?.followedBy ?: false
|
||||||
|
Loading…
Reference in New Issue
Block a user