Skip to content

Commit ef35b36

Browse files
dhruvpatidar359TobiGrAudricV
committed
Remove the redundant/overlapping toast "Copied to clipboard" for Android 13+
Signed-off-by: dhruv <dhruvpatidar35@gmail.com> Co-authored-by: Tobi <TobiGr@users.noreply.github.com> Co-authored-by: AudricV <74829229+AudricV@users.noreply.github.com>
1 parent 4573407 commit ef35b36

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

  • app/src/main/java/org/schabi/newpipe/util/external_communication

app/src/main/java/org/schabi/newpipe/util/external_communication/ShareUtils.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,10 @@ public static void copyToClipboard(@NonNull final Context context, final String
314314
}
315315

316316
clipboardManager.setPrimaryClip(ClipData.newPlainText(null, text));
317-
Toast.makeText(context, R.string.msg_copied, Toast.LENGTH_SHORT).show();
317+
if (Build.VERSION.SDK_INT < 33) {
318+
// Android 13 has its own "copied to clipboard" dialog
319+
Toast.makeText(context, R.string.msg_copied, Toast.LENGTH_SHORT).show();
320+
}
318321
}
319322

320323
/**

0 commit comments

Comments
 (0)