Compare commits

...

1 Commits
v4.2 ... v4.2.1

Author SHA1 Message Date
Koitharu
bd6a51e58d Fix crash on cold launch 2023-01-09 19:12:37 +02:00
2 changed files with 6 additions and 3 deletions

View File

@@ -15,8 +15,8 @@ android {
applicationId 'org.koitharu.kotatsu'
minSdkVersion 21
targetSdkVersion 33
versionCode 509
versionName '4.2'
versionCode 510
versionName '4.2.1'
generatedDensities = []
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

View File

@@ -46,7 +46,10 @@ class MainNavigationDelegate(
fun onCreate(savedInstanceState: Bundle?) {
primaryFragment?.let {
onFragmentChanged(it, fromUser = false)
navBar.selectedItemId = getItemId(it)
val itemId = getItemId(it)
if (navBar.selectedItemId != itemId) {
navBar.selectedItemId = itemId
}
} ?: onNavigationItemSelected(navBar.selectedItemId)
}