[#13235] Fix opening of the last shown chat with activated local notifications
This commit is contained in:
parent
ba38f3ec74
commit
4036e21f17
|
@ -415,6 +415,11 @@
|
||||||
(when (= stored-key-uid key-uid)
|
(when (= stored-key-uid key-uid)
|
||||||
(re-frame/dispatch [:chat.ui/navigate-to-chat chat-id])))))))))
|
(re-frame/dispatch [:chat.ui/navigate-to-chat chat-id])))))))))
|
||||||
|
|
||||||
|
(fx/defn check-last-chat
|
||||||
|
{:events [::check-last-chat]}
|
||||||
|
[{:keys [db]}]
|
||||||
|
{::open-last-chat (get-in db [:multiaccount :key-uid])})
|
||||||
|
|
||||||
(fx/defn get-chats-callback
|
(fx/defn get-chats-callback
|
||||||
{:events [::get-chats-callback]}
|
{:events [::get-chats-callback]}
|
||||||
[{:keys [db] :as cofx}]
|
[{:keys [db] :as cofx}]
|
||||||
|
|
|
@ -13,7 +13,8 @@
|
||||||
[status-im.ui.screens.views :as views]
|
[status-im.ui.screens.views :as views]
|
||||||
[status-im.utils.fx :as fx]
|
[status-im.utils.fx :as fx]
|
||||||
[status-im.utils.platform :as platform]
|
[status-im.utils.platform :as platform]
|
||||||
[taoensso.timbre :as log]))
|
[taoensso.timbre :as log]
|
||||||
|
[status-im.multiaccounts.login.core :as login-core]))
|
||||||
|
|
||||||
(def debug? ^boolean js/goog.DEBUG)
|
(def debug? ^boolean js/goog.DEBUG)
|
||||||
|
|
||||||
|
@ -206,7 +207,8 @@
|
||||||
(re-frame/dispatch-sync [::set-multiaccount-root])
|
(re-frame/dispatch-sync [::set-multiaccount-root])
|
||||||
(when @root-id
|
(when @root-id
|
||||||
(reset! root-comp-id @root-id)
|
(reset! root-comp-id @root-id)
|
||||||
(.setRoot Navigation (clj->js (get (roots/roots) @root-id)))))
|
(.setRoot Navigation (clj->js (get (roots/roots) @root-id)))
|
||||||
|
(re-frame/dispatch [::login-core/check-last-chat])))
|
||||||
(.hide ^js splash-screen))))
|
(.hide ^js splash-screen))))
|
||||||
|
|
||||||
(defn get-screen-component [comp]
|
(defn get-screen-component [comp]
|
||||||
|
|
Loading…
Reference in New Issue