Browse Source
move private post warning to share dialog
i don't know if this works on android 10+ but eh
renovate/org.robolectric-robolectric-4.x
Austin Huang
4 years ago
No known key found for this signature in database
GPG Key ID: 84C23AA04587A91F
1 changed files with
3 additions and
2 deletions
-
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, |
|
|
|