]> git.ktnx.net Git - mobile-ledger.git/commitdiff
remove the focused check before restoring cursor position
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Thu, 4 Mar 2021 17:25:07 +0000 (19:25 +0200)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Thu, 4 Mar 2021 17:25:07 +0000 (19:25 +0200)
the check can fail for some reason, breaking user experience

app/src/main/java/net/ktnx/mobileledger/ui/new_transaction/NewTransactionItemHolder.java

index c6232d167f7e303af4d93be2222354918727cc36..247f40eb748006c83477c59433661037e31919e6 100644 (file)
@@ -626,9 +626,7 @@ class NewTransactionItemHolder extends RecyclerView.ViewHolder
                         try {
                             b.accountRowAccName.setAdapter(null);
                             b.accountRowAccName.setText(incomingAccountName);
-                            if (b.accountRowAccName.hasFocus())
-                                b.accountRowAccName.setSelection(
-                                        acc.getAccountNameCursorPosition());
+                            b.accountRowAccName.setSelection(acc.getAccountNameCursorPosition());
                         }
                         finally {
                             b.accountRowAccName.setAdapter(a);