mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-12-27 19:38:22 +01:00
Disable Copied toast on android 13+ (#1139)
This commit is contained in:
parent
9b8cd3816f
commit
48dcf2293c
@ -148,7 +148,9 @@ public class GiveAwardActivity extends BaseActivity {
|
|||||||
if (clipboard != null) {
|
if (clipboard != null) {
|
||||||
ClipData clip = ClipData.newPlainText("simple text", text);
|
ClipData clip = ClipData.newPlainText("simple text", text);
|
||||||
clipboard.setPrimaryClip(clip);
|
clipboard.setPrimaryClip(clip);
|
||||||
Toast.makeText(GiveAwardActivity.this, R.string.copy_success, Toast.LENGTH_SHORT).show();
|
if (android.os.Build.VERSION.SDK_INT < 33) {
|
||||||
|
Toast.makeText(GiveAwardActivity.this, R.string.copy_success, Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(GiveAwardActivity.this, R.string.copy_failed, Toast.LENGTH_SHORT).show();
|
Toast.makeText(GiveAwardActivity.this, R.string.copy_failed, Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
|
@ -157,7 +157,9 @@ public class WebViewActivity extends BaseActivity {
|
|||||||
if (clipboard != null) {
|
if (clipboard != null) {
|
||||||
ClipData clip = ClipData.newPlainText("simple text", url);
|
ClipData clip = ClipData.newPlainText("simple text", url);
|
||||||
clipboard.setPrimaryClip(clip);
|
clipboard.setPrimaryClip(clip);
|
||||||
Toast.makeText(this, R.string.copy_success, Toast.LENGTH_SHORT).show();
|
if (android.os.Build.VERSION.SDK_INT < 33) {
|
||||||
|
Toast.makeText(this, R.string.copy_success, Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(this, R.string.copy_link_failed, Toast.LENGTH_SHORT).show();
|
Toast.makeText(this, R.string.copy_link_failed, Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
|
@ -294,7 +294,9 @@ public class PrivateMessagesDetailRecyclerViewAdapter extends RecyclerView.Adapt
|
|||||||
if (clipboard != null) {
|
if (clipboard != null) {
|
||||||
ClipData clip = ClipData.newPlainText("simple text", message.getBody());
|
ClipData clip = ClipData.newPlainText("simple text", message.getBody());
|
||||||
clipboard.setPrimaryClip(clip);
|
clipboard.setPrimaryClip(clip);
|
||||||
Toast.makeText(mViewPrivateMessagesActivity, R.string.copy_success, Toast.LENGTH_SHORT).show();
|
if (android.os.Build.VERSION.SDK_INT < 33) {
|
||||||
|
Toast.makeText(mViewPrivateMessagesActivity, R.string.copy_success, Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(mViewPrivateMessagesActivity, R.string.copy_failed, Toast.LENGTH_SHORT).show();
|
Toast.makeText(mViewPrivateMessagesActivity, R.string.copy_failed, Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
|
@ -134,7 +134,9 @@ public class CopyTextBottomSheetFragment extends LandscapeExpandedRoundedBottomS
|
|||||||
if (clipboard != null) {
|
if (clipboard != null) {
|
||||||
ClipData clip = ClipData.newPlainText("simple text", text);
|
ClipData clip = ClipData.newPlainText("simple text", text);
|
||||||
clipboard.setPrimaryClip(clip);
|
clipboard.setPrimaryClip(clip);
|
||||||
Toast.makeText(activity, R.string.copy_success, Toast.LENGTH_SHORT).show();
|
if (android.os.Build.VERSION.SDK_INT < 33) {
|
||||||
|
Toast.makeText(activity, R.string.copy_success, Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(activity, R.string.copy_link_failed, Toast.LENGTH_SHORT).show();
|
Toast.makeText(activity, R.string.copy_link_failed, Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
|
@ -140,7 +140,9 @@ public class ShareLinkBottomSheetFragment extends LandscapeExpandedRoundedBottom
|
|||||||
if (clipboard != null) {
|
if (clipboard != null) {
|
||||||
ClipData clip = ClipData.newPlainText("simple text", link);
|
ClipData clip = ClipData.newPlainText("simple text", link);
|
||||||
clipboard.setPrimaryClip(clip);
|
clipboard.setPrimaryClip(clip);
|
||||||
Toast.makeText(activity, R.string.copy_success, Toast.LENGTH_SHORT).show();
|
if (android.os.Build.VERSION.SDK_INT < 33) {
|
||||||
|
Toast.makeText(activity, R.string.copy_success, Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(activity, R.string.copy_link_failed, Toast.LENGTH_SHORT).show();
|
Toast.makeText(activity, R.string.copy_link_failed, Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
|
@ -80,7 +80,9 @@ public class UrlMenuBottomSheetFragment extends LandscapeExpandedRoundedBottomSh
|
|||||||
if (clipboard != null) {
|
if (clipboard != null) {
|
||||||
ClipData clip = ClipData.newPlainText("simple text", url);
|
ClipData clip = ClipData.newPlainText("simple text", url);
|
||||||
clipboard.setPrimaryClip(clip);
|
clipboard.setPrimaryClip(clip);
|
||||||
Toast.makeText(activity, R.string.copy_success, Toast.LENGTH_SHORT).show();
|
if (android.os.Build.VERSION.SDK_INT < 33) {
|
||||||
|
Toast.makeText(activity, R.string.copy_success, Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(activity, R.string.copy_link_failed, Toast.LENGTH_SHORT).show();
|
Toast.makeText(activity, R.string.copy_link_failed, Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user