aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoro13e <109251285+o13e@users.noreply.github.com>2022-10-15 11:07:24 +0000
committerGitHub <noreply@github.com>2022-10-15 11:07:24 +0000
commit48dcf2293cabf19578a35269e890125838efa8c2 (patch)
tree37d27bc6dce95584fca9f1e7b194477bb28f9113
parent9b8cd3816faf54781537c6c4ea472aec957d15ae (diff)
downloadinfinity-for-reddit-48dcf2293cabf19578a35269e890125838efa8c2.tar
infinity-for-reddit-48dcf2293cabf19578a35269e890125838efa8c2.tar.gz
infinity-for-reddit-48dcf2293cabf19578a35269e890125838efa8c2.tar.bz2
infinity-for-reddit-48dcf2293cabf19578a35269e890125838efa8c2.tar.lz
infinity-for-reddit-48dcf2293cabf19578a35269e890125838efa8c2.tar.xz
infinity-for-reddit-48dcf2293cabf19578a35269e890125838efa8c2.tar.zst
infinity-for-reddit-48dcf2293cabf19578a35269e890125838efa8c2.zip
Disable Copied toast on android 13+ (#1139)
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/activities/GiveAwardActivity.java4
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/activities/WebViewActivity.java4
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PrivateMessagesDetailRecyclerViewAdapter.java4
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/CopyTextBottomSheetFragment.java4
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/ShareLinkBottomSheetFragment.java4
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/UrlMenuBottomSheetFragment.java4
6 files changed, 18 insertions, 6 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/GiveAwardActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/GiveAwardActivity.java
index e6094cdd..d3b32e4e 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/GiveAwardActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/GiveAwardActivity.java
@@ -148,7 +148,9 @@ public class GiveAwardActivity extends BaseActivity {
if (clipboard != null) {
ClipData clip = ClipData.newPlainText("simple text", text);
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 {
Toast.makeText(GiveAwardActivity.this, R.string.copy_failed, Toast.LENGTH_SHORT).show();
}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/WebViewActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/WebViewActivity.java
index 9922ca59..c61bb41b 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/WebViewActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/WebViewActivity.java
@@ -157,7 +157,9 @@ public class WebViewActivity extends BaseActivity {
if (clipboard != null) {
ClipData clip = ClipData.newPlainText("simple text", url);
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 {
Toast.makeText(this, R.string.copy_link_failed, Toast.LENGTH_SHORT).show();
}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PrivateMessagesDetailRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PrivateMessagesDetailRecyclerViewAdapter.java
index 5893d79e..de0898ae 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PrivateMessagesDetailRecyclerViewAdapter.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PrivateMessagesDetailRecyclerViewAdapter.java
@@ -294,7 +294,9 @@ public class PrivateMessagesDetailRecyclerViewAdapter extends RecyclerView.Adapt
if (clipboard != null) {
ClipData clip = ClipData.newPlainText("simple text", message.getBody());
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 {
Toast.makeText(mViewPrivateMessagesActivity, R.string.copy_failed, Toast.LENGTH_SHORT).show();
}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/CopyTextBottomSheetFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/CopyTextBottomSheetFragment.java
index c30fdddb..d4852e04 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/CopyTextBottomSheetFragment.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/CopyTextBottomSheetFragment.java
@@ -134,7 +134,9 @@ public class CopyTextBottomSheetFragment extends LandscapeExpandedRoundedBottomS
if (clipboard != null) {
ClipData clip = ClipData.newPlainText("simple text", text);
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 {
Toast.makeText(activity, R.string.copy_link_failed, Toast.LENGTH_SHORT).show();
}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/ShareLinkBottomSheetFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/ShareLinkBottomSheetFragment.java
index 1d69854f..f50e17d7 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/ShareLinkBottomSheetFragment.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/ShareLinkBottomSheetFragment.java
@@ -140,7 +140,9 @@ public class ShareLinkBottomSheetFragment extends LandscapeExpandedRoundedBottom
if (clipboard != null) {
ClipData clip = ClipData.newPlainText("simple text", link);
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 {
Toast.makeText(activity, R.string.copy_link_failed, Toast.LENGTH_SHORT).show();
}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/UrlMenuBottomSheetFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/UrlMenuBottomSheetFragment.java
index 85da693c..ac9d1fdf 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/UrlMenuBottomSheetFragment.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/UrlMenuBottomSheetFragment.java
@@ -80,7 +80,9 @@ public class UrlMenuBottomSheetFragment extends LandscapeExpandedRoundedBottomSh
if (clipboard != null) {
ClipData clip = ClipData.newPlainText("simple text", url);
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 {
Toast.makeText(activity, R.string.copy_link_failed, Toast.LENGTH_SHORT).show();
}