Skip to content

Commit

Permalink
Fix Bug: Account Spinner did change the selected account (initiate an…
Browse files Browse the repository at this point in the history
… init() call) when updateAccountSpinner() is called but an update was not needed.

Signed-off-by: n1lsb <n.beyer@outlook.com>
  • Loading branch information
n1lsb committed Jun 8, 2018
1 parent 4fcfca1 commit 8857f64
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,12 @@ class AccountSpinner(context: Context, attrs: AttributeSet) : AppCompatSpinner(c
val accountList = filterAccounts(viewConfig)
// check if update is needed
for (i in accountList.indices) {
if (adapter.count - 1 < i) {
if (adapter.count < i) {
init()
break
}

if (accountList[i] != adapter.getItem(i)) {
if (accountList[i].getTitle(context) != adapter.getItem(i)) {
init()
break
}
Expand Down

0 comments on commit 8857f64

Please sign in to comment.