Fixed country picker in assistant not working for first item

This commit is contained in:
Sylvain Berfini 2021-03-05 15:33:26 +01:00
parent 6f65fe35c3
commit 4969b6c755

View file

@ -55,7 +55,7 @@ class CountryPickerFragment(private val listener: CountryPickedListener) : Dialo
binding.countryList.adapter = adapter
binding.countryList.setOnItemClickListener { _, _, position, _ ->
if (position > 0 && position < adapter.count) {
if (position >= 0 && position < adapter.count) {
val dialPlan = adapter.getItem(position)
listener.onCountryClicked(dialPlan)
}