Show "Copied to clipboard" toast on Android 12L

This commit is contained in:
AntsyLich 2023-07-16 20:17:22 +06:00 committed by GitHub
parent a3a3f44056
commit ba87b35600
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -52,7 +52,7 @@ fun Context.copyToClipboard(label: String, content: String) {
// Android 13 and higher shows a visual confirmation of copied contents
// https://developer.android.com/about/versions/13/features/copy-paste
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.S_V2) {
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.TIRAMISU) {
toast(getString(R.string.copied_to_clipboard, content.truncateCenter(50)))
}
} catch (e: Throwable) {