Skip to content

Commit 3d96687

Browse files
committed
Use isRPlus instead of direct SDK version checks
1 parent ab3cfc3 commit 3d96687

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

app/src/main/kotlin/com/simplemobiletools/keyboard/views/InlineContentViewHorizontalScrollView.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import androidx.annotation.AttrRes
1212
import androidx.core.view.allViews
1313
import com.simplemobiletools.commons.extensions.beInvisible
1414
import com.simplemobiletools.commons.extensions.beVisible
15+
import com.simplemobiletools.commons.helpers.isRPlus
1516

1617

1718
/**
@@ -46,7 +47,7 @@ class InlineContentViewHorizontalScrollView @JvmOverloads constructor(
4647
}
4748

4849
fun hideAllInlineContentViews() {
49-
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.R) {
50+
if (!isRPlus()) {
5051
return
5152
}
5253
allViews.forEach {
@@ -57,7 +58,7 @@ class InlineContentViewHorizontalScrollView @JvmOverloads constructor(
5758
}
5859

5960
fun showAllInlineContentViews() {
60-
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.R) {
61+
if (!isRPlus()) {
6162
return
6263
}
6364
allViews.forEach {
@@ -69,7 +70,7 @@ class InlineContentViewHorizontalScrollView @JvmOverloads constructor(
6970

7071
private fun clipDescendantInlineContentViews() {
7172
// This is only needed for InlineContentViews which are not available before this version
72-
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.R) {
73+
if (!isRPlus()) {
7374
return
7475
}
7576

0 commit comments

Comments
 (0)