fix Test mode banner disappears after redirect upon push notification (#20263)
This commit is contained in:
parent
cb4ce20c98
commit
0e76e88a81
|
@ -32,8 +32,16 @@
|
|||
[{:keys [db]}]
|
||||
{:db (dissoc db :alert-banners/hide?)})
|
||||
|
||||
;; When push notifications are enabled and the app is closed then overlays get dismissed,
|
||||
;; we need to restore them once app is relaunched
|
||||
(defn restore-alert-banners
|
||||
[{:keys [db]}]
|
||||
(when-not (zero? (count (get db :alert-banners)))
|
||||
{:show-alert-banner [(:view-id db) (:theme db)]}))
|
||||
|
||||
(re-frame/reg-event-fx :alert-banners/add add-alert-banner)
|
||||
(re-frame/reg-event-fx :alert-banners/remove remove-alert-banner)
|
||||
(re-frame/reg-event-fx :alert-banners/remove-all remove-all-alert-banners)
|
||||
(re-frame/reg-event-fx :alert-banners/hide hide-alert-banners)
|
||||
(re-frame/reg-event-fx :alert-banners/unhide unhide-alert-banners)
|
||||
(re-frame/reg-event-fx :alert-banners/restore-alert-banners restore-alert-banners)
|
||||
|
|
|
@ -30,7 +30,8 @@
|
|||
(when @state/root-id
|
||||
(reset! theme/device-theme (rn/get-color-scheme))
|
||||
(re-frame/dispatch [:init-root @state/root-id])
|
||||
(re-frame/dispatch [:chat/check-last-chat]))
|
||||
(re-frame/dispatch [:chat/check-last-chat])
|
||||
(re-frame/dispatch [:alert-banners/restore-alert-banners]))
|
||||
(rn/hide-splash-screen)))
|
||||
|
||||
;;;; Modal
|
||||
|
|
Loading…
Reference in New Issue