1
0
mirror of https://github.com/KokaKiwi/BarInsta synced 2024-11-14 10:47:30 +00:00
This commit is contained in:
Austin Huang 2021-07-09 15:17:32 -04:00
parent ce764ec82f
commit 57ffd32c83
No known key found for this signature in database
GPG Key ID: 84C23AA04587A91F
2 changed files with 9 additions and 0 deletions

View File

@ -755,6 +755,8 @@ public class PostViewV2Fragment extends Fragment implements EditTextDialogFragme
popupMenu.setOnMenuItemClickListener(item -> { popupMenu.setOnMenuItemClickListener(item -> {
final int itemId = item.getItemId(); final int itemId = item.getItemId();
if (itemId == R.id.share_dm) { if (itemId == R.id.share_dm) {
if (profileModel.isPrivate())
Toast.makeText(context, R.string.share_private_post, Toast.LENGTH_SHORT).show();
final UserSearchNavGraphDirections.ActionGlobalUserSearch actionGlobalUserSearch = UserSearchFragmentDirections final UserSearchNavGraphDirections.ActionGlobalUserSearch actionGlobalUserSearch = UserSearchFragmentDirections
.actionGlobalUserSearch() .actionGlobalUserSearch()
.setTitle(getString(R.string.share)) .setTitle(getString(R.string.share))

View File

@ -797,6 +797,13 @@ class StoryViewerFragment : Fragment() {
} }
private fun shareStoryViaDm() { private fun shareStoryViaDm() {
val story = storiesViewModel.getCurrentStory().value ?: return
val context = context
if (story.user?.isPrivate == true && context != null) {
Toast.makeText(context, R.string.share_private_post, Toast.LENGTH_SHORT).show()
}
val actionBar = fragmentActivity.supportActionBar
if (actionBar != null) actionBar.subtitle = null
val actionGlobalUserSearch = UserSearchFragmentDirections.actionGlobalUserSearch().apply { val actionGlobalUserSearch = UserSearchFragmentDirections.actionGlobalUserSearch().apply {
title = getString(R.string.share) title = getString(R.string.share)
setActionLabel(getString(R.string.send)) setActionLabel(getString(R.string.send))