1
0
mirror of https://github.com/KokaKiwi/BarInsta synced 2024-12-23 05:16:58 +00:00

move private post warning to share dialog

i don't know if this works on android 10+ but eh
This commit is contained in:
Austin Huang 2021-05-30 20:02:18 -04:00
parent 241c9437c5
commit 267096ff39
No known key found for this signature in database
GPG Key ID: 84C23AA04587A91F

View File

@ -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,