Skip to content

Commit

Permalink
chore: drop React Native 0.62, 0.63 since 3.14.0 (#1533)
Browse files Browse the repository at this point in the history
* docs: add note to main readme

Since 3.15.0 we support React Native 0.64+

* chore: set minSdkVersion to 21

* chore: remove unnecessary check for API version in Android code

Due to https://apilevels.com/ Build.VERSION_CODES.LOLIPOP is API version
21 --> from now on this condition is redundant

* chore: remove obsolete check for Android API version

According to https://apilevels.com/ JELLY_BEAN_MR1 is API version 17 -->
this check is now obsolete. So is the annotation.
  • Loading branch information
kkafar authored Jul 18, 2022
1 parent ac4d780 commit e27b068
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ Screens are already integrated with the React Native's most popular navigation l

| version | react-native version |
| ------- | -------------------- |
| 3.14.0+ | 0.64.0+ |
| 3.0.0+ | 0.62.0+ |
| 2.0.0+ | 0.60.0+ |

Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ android {
}

defaultConfig {
minSdkVersion safeExtGet('minSdkVersion', 16)
minSdkVersion safeExtGet('minSdkVersion', 21)
targetSdkVersion safeExtGet('targetSdkVersion', 22)
versionCode 1
versionName "1.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,15 +130,14 @@ class ScreenStackHeaderConfig(context: Context) : ViewGroup(context) {
return null
}

@SuppressLint("ObsoleteSdkInt") // to be removed when support for < 0.64 is dropped
fun onUpdate() {
val stack = screenStack
val isTop = stack == null || stack.topScreen == parent
if (!mIsAttachedToWindow || !isTop || mDestroyed) {
return
}
val activity = screenFragment?.activity as AppCompatActivity? ?: return
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1 && mDirection != null) {
if (mDirection != null) {
if (mDirection == "rtl") {
toolbar.layoutDirection = LAYOUT_DIRECTION_RTL
} else if (mDirection == "ltr") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ object ScreenWindowTraits {

@SuppressLint("ObsoleteSdkInt") // to be removed when support for < 0.64 is dropped
internal fun setColor(screen: Screen, activity: Activity?, context: ReactContext?) {
if (activity == null || context == null || Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
if (activity == null || context == null) {
return
}
if (mDefaultStatusBarColor == null) {
Expand Down

0 comments on commit e27b068

Please sign in to comment.