Skip to content

Commit

Permalink
Fixed crash related to type of object accepted by an interface (eu-di…
Browse files Browse the repository at this point in the history
…gital-green-certificates#148)

* Fixed crash related to type of object accepted by an interface

* Version update
  • Loading branch information
oleksandrsarapulovgl authored Jul 14, 2021
1 parent 22a91b5 commit 5c3a86c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ class CodeReaderFragment : Fragment(), NavController.OnDestinationChangedListene
binding.countrySelector.onItemSelectedListener = object : OnItemSelectedListener {
override fun onItemSelected(
parentView: AdapterView<*>?,
selectedItemView: View,
selectedItemView: View?,
position: Int,
id: Long
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ class CodeReaderViewModel @Inject constructor(
}

_countries.addSource(_selectedCountry) {
_countries.value = Pair(_countries.value?.first ?: emptyList(), it ?: "")
if (_countries.value?.second == null || _countries.value?.second != it) {
_countries.value = Pair(_countries.value?.first ?: emptyList(), it ?: "")
}
}
}
}
4 changes: 2 additions & 2 deletions buildSrc/src/main/java/AppConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ object Config {
const val targetSdk = 29
val javaVersion = JavaVersion.VERSION_1_8

const val versionCode = 14
const val versionName = "1.1.6"
const val versionCode = 15
const val versionName = "1.1.7"

const val androidTestInstrumentation = "androidx.test.runner.AndroidJUnitRunner"
const val proguardConsumerRules = "consumer-rules.pro"
Expand Down

0 comments on commit 5c3a86c

Please sign in to comment.