Fix TOTP field flashing on each update (#1779)

* Fix TOTP field flashing on each update

* Add missing changelog entry
This commit is contained in:
Harsh Shandilya 2022-03-11 10:54:51 +05:30 committed by GitHub
parent 2f034bc237
commit 186b8352b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 0 deletions

View file

@ -17,6 +17,7 @@ All notable changes to this project will be documented in this file.
- Introduce a new opt-in PGP backend powered by [PGPainless](https://github.com/pgpainless/pgpainless) that does not require OpenKeychain
- Add the ability to run garbage collection on the internal Git repository
- Introduce crash reporting backed by Sentry
- TOTP field now shows the remaining time for which it is valid
### Fixed

View file

@ -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)

View file

@ -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)