fix keycard account shown as regular account on theme change while login (#13918)

This commit is contained in:
Parvesh Monu 2022-09-05 21:17:39 +05:30 committed by GitHub
parent 337a4d7d1c
commit a5ef9940da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 29 additions and 23 deletions

View File

@ -124,6 +124,10 @@
view-id (:view-id db)
screen-params (get-in db [:navigation/screen-params view-id])
root-id @navigation.state/root-id
key-uid (get-in db [:multiaccounts/login :key-uid])
keycard-account? (boolean (get-in db [:multiaccounts/multiaccounts
key-uid
:keycard-pairing]))
dispatch-later (cond-> []
(= view-id :chat)
(conj {:ms 1000
@ -159,7 +163,9 @@
(visibility-status-popover/hide-visibility-status-popover))
(when (get-in db [:signing/tx])
(signing/discard))
(navigation/init-root root-id)
(if (and (= root-id :multiaccounts) keycard-account?)
(navigation/init-root-with-component :multiaccounts-keycard :multiaccounts)
(navigation/init-root root-id))
(when (= root-id :chat-stack)
(navigation/change-tab current-tab))))))