From 3d96687c60c52e35c8f567a7d35541be6f45c128 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Thu, 6 Jul 2023 16:30:26 +0200 Subject: [PATCH] Use isRPlus instead of direct SDK version checks --- .../views/InlineContentViewHorizontalScrollView.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/keyboard/views/InlineContentViewHorizontalScrollView.kt b/app/src/main/kotlin/com/simplemobiletools/keyboard/views/InlineContentViewHorizontalScrollView.kt index c3e7ab1..4fa9137 100644 --- a/app/src/main/kotlin/com/simplemobiletools/keyboard/views/InlineContentViewHorizontalScrollView.kt +++ b/app/src/main/kotlin/com/simplemobiletools/keyboard/views/InlineContentViewHorizontalScrollView.kt @@ -12,6 +12,7 @@ import androidx.annotation.AttrRes import androidx.core.view.allViews import com.simplemobiletools.commons.extensions.beInvisible import com.simplemobiletools.commons.extensions.beVisible +import com.simplemobiletools.commons.helpers.isRPlus /** @@ -46,7 +47,7 @@ class InlineContentViewHorizontalScrollView @JvmOverloads constructor( } fun hideAllInlineContentViews() { - if (Build.VERSION.SDK_INT < Build.VERSION_CODES.R) { + if (!isRPlus()) { return } allViews.forEach { @@ -57,7 +58,7 @@ class InlineContentViewHorizontalScrollView @JvmOverloads constructor( } fun showAllInlineContentViews() { - if (Build.VERSION.SDK_INT < Build.VERSION_CODES.R) { + if (!isRPlus()) { return } allViews.forEach { @@ -69,7 +70,7 @@ class InlineContentViewHorizontalScrollView @JvmOverloads constructor( private fun clipDescendantInlineContentViews() { // This is only needed for InlineContentViews which are not available before this version - if (Build.VERSION.SDK_INT < Build.VERSION_CODES.R) { + if (!isRPlus()) { return }