Skip to content
Snippets Groups Projects
Verified Commit a31ff773 authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

Fixes a crash when no identities exist yet

parent 19efd53f
Branches
Tags
No related merge requests found
Pipeline #
...@@ -67,7 +67,8 @@ class IdentityAdapter : RecyclerSpinnerAdapter<IdentityAdapter.NetworkViewHolder ...@@ -67,7 +67,8 @@ class IdentityAdapter : RecyclerSpinnerAdapter<IdentityAdapter.NetworkViewHolder
return null return null
} }
override fun getItem(position: Int): Identity? = data[position] override fun getItem(position: Int): Identity? =
if (position in 0 until data.size) data[position] else null
override fun getItemId(position: Int) = getItem(position)?.id()?.toLong() ?: -1 override fun getItemId(position: Int) = getItem(position)?.id()?.toLong() ?: -1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment