From 7c71fa95c5015c7cb3ba7d7c2ee3e41441e3d78a Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Sun, 28 Feb 2021 18:55:00 +0200 Subject: [PATCH] avoid crash when there is no information about focused element observed when sending the transaction to the backend throws an exception --- .../ui/new_transaction/NewTransactionItemHolder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/new_transaction/NewTransactionItemHolder.java b/app/src/main/java/net/ktnx/mobileledger/ui/new_transaction/NewTransactionItemHolder.java index 470467d4..4274a99b 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/new_transaction/NewTransactionItemHolder.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/new_transaction/NewTransactionItemHolder.java @@ -209,7 +209,7 @@ class NewTransactionItemHolder extends RecyclerView.ViewHolder } ignoreFocusChanges = true; try { - if (((focusInfo == null) || + if (((focusInfo == null) || (focusInfo.element == null) || focusInfo.position != getAdapterPosition()) || itemView.hasFocus()) return; -- 2.39.5