[#10418] Can login to account just via tap upon it from `Your keys` view
Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
This commit is contained in:
parent
f73754af34
commit
0a4547e652
|
@ -35,9 +35,10 @@
|
|||
(fx/defn initialize-views
|
||||
{:events [::initialize-view]}
|
||||
[cofx {:keys [logout?]}]
|
||||
(let [{{:multiaccounts/keys [multiaccounts] :as db} :db} cofx]
|
||||
(let [{{:multiaccounts/keys [multiaccounts]} :db} cofx]
|
||||
(when (and (seq multiaccounts) (not logout?))
|
||||
(let [{:keys [key-uid public-key photo-path name]} (first (#(sort-by :last-sign-in > %) (vals multiaccounts)))]
|
||||
(let [{:keys [key-uid public-key photo-path name]}
|
||||
(first (sort-by :timestamp > (vals multiaccounts)))]
|
||||
(multiaccounts.login/open-login cofx key-uid photo-path name public-key)))))
|
||||
|
||||
(fx/defn initialize-multiaccounts
|
||||
|
|
Loading…
Reference in New Issue