From 186b8352b50c8639aa6ff71b97ef5e3ce62e7581 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Fri, 11 Mar 2022 10:54:51 +0530 Subject: Fix TOTP field flashing on each update (#1779) * Fix TOTP field flashing on each update * Add missing changelog entry --- app/src/main/java/dev/msfjarvis/aps/ui/crypto/DecryptActivity.kt | 1 + app/src/main/java/dev/msfjarvis/aps/ui/crypto/DecryptActivityV2.kt | 1 + 2 files changed, 2 insertions(+) (limited to 'app/src/main') diff --git a/app/src/main/java/dev/msfjarvis/aps/ui/crypto/DecryptActivity.kt b/app/src/main/java/dev/msfjarvis/aps/ui/crypto/DecryptActivity.kt index c6fda844..77abde2a 100644 --- a/app/src/main/java/dev/msfjarvis/aps/ui/crypto/DecryptActivity.kt +++ b/app/src/main/java/dev/msfjarvis/aps/ui/crypto/DecryptActivity.kt @@ -208,6 +208,7 @@ class DecryptActivity : BasePgpActivity(), OpenPgpServiceConnection.OnBound { val adapter = FieldItemAdapter(items, showPassword) { text -> copyTextToClipboard(text) } binding.recyclerView.adapter = adapter + binding.recyclerView.itemAnimator = null if (entry.hasTotp()) { entry.totp.onEach(adapter::updateOTPCode).launchIn(lifecycleScope) diff --git a/app/src/main/java/dev/msfjarvis/aps/ui/crypto/DecryptActivityV2.kt b/app/src/main/java/dev/msfjarvis/aps/ui/crypto/DecryptActivityV2.kt index 21cd42aa..424d5c46 100644 --- a/app/src/main/java/dev/msfjarvis/aps/ui/crypto/DecryptActivityV2.kt +++ b/app/src/main/java/dev/msfjarvis/aps/ui/crypto/DecryptActivityV2.kt @@ -196,6 +196,7 @@ class DecryptActivityV2 : BasePgpActivity() { val adapter = FieldItemAdapter(items, showPassword) { text -> copyTextToClipboard(text) } binding.recyclerView.adapter = adapter + binding.recyclerView.itemAnimator = null if (entry.hasTotp()) { entry.totp.onEach(adapter::updateOTPCode).launchIn(lifecycleScope) -- cgit v1.2.3