From 267096ff3924830e5780b84fb5005423fe7b78ae Mon Sep 17 00:00:00 2001 From: Austin Huang Date: Sun, 30 May 2021 20:02:18 -0400 Subject: [PATCH] move private post warning to share dialog i don't know if this works on android 10+ but eh --- .../awais/instagrabber/fragments/PostViewV2Fragment.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/awais/instagrabber/fragments/PostViewV2Fragment.java b/app/src/main/java/awais/instagrabber/fragments/PostViewV2Fragment.java index 71e2a43c..3d642502 100644 --- a/app/src/main/java/awais/instagrabber/fragments/PostViewV2Fragment.java +++ b/app/src/main/java/awais/instagrabber/fragments/PostViewV2Fragment.java @@ -763,8 +763,7 @@ public class PostViewV2Fragment extends Fragment implements EditTextDialogFragme if (isPrivate) { final Context context = getContext(); if (context == null) return; - // is this necessary? - Toast.makeText(context, R.string.share_private_post, Toast.LENGTH_LONG).show(); +// Toast.makeText(context, R.string.share_private_post, Toast.LENGTH_LONG).show(); } if (viewModel.isLoggedIn()) { final Context context = getContext(); @@ -807,6 +806,8 @@ public class PostViewV2Fragment extends Fragment implements EditTextDialogFragme private void shareLink(@NonNull final Media media, final boolean isPrivate) { final Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND); sharingIntent.setType("text/plain"); + sharingIntent.putExtra(android.content.Intent.EXTRA_TITLE, + getString(isPrivate ? R.string.share_private_post : R.string.share_public_post)); sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, "https://instagram.com/p/" + media.getCode()); startActivity(Intent.createChooser( sharingIntent,