mirror of
https://github.com/status-im/status-react.git
synced 2025-03-01 02:50:50 +00:00
fix multiple set view-id events dispatched (#19083)
This commit is contained in:
parent
62f68ff44b
commit
e771d056a0
@ -21,6 +21,7 @@
|
|||||||
[status-im.contexts.profile.push-notifications.events :as notifications]
|
[status-im.contexts.profile.push-notifications.events :as notifications]
|
||||||
[status-im.contexts.shell.jump-to.state :as shell.state]
|
[status-im.contexts.shell.jump-to.state :as shell.state]
|
||||||
[status-im.contexts.shell.jump-to.utils :as shell.utils]
|
[status-im.contexts.shell.jump-to.utils :as shell.utils]
|
||||||
|
[status-im.navigation.core :as navigation]
|
||||||
status-im.contexts.wallet.signals
|
status-im.contexts.wallet.signals
|
||||||
status-im.events
|
status-im.events
|
||||||
status-im.navigation.core
|
status-im.navigation.core
|
||||||
@ -44,7 +45,7 @@
|
|||||||
|
|
||||||
(defn init
|
(defn init
|
||||||
[]
|
[]
|
||||||
|
(navigation/init)
|
||||||
(native-module/init #(re-frame/dispatch [:signals/signal-received %]))
|
(native-module/init #(re-frame/dispatch [:signals/signal-received %]))
|
||||||
(when platform/android?
|
(when platform/android?
|
||||||
(native-module/set-soft-input-mode adjust-resize))
|
(native-module/set-soft-input-mode adjust-resize))
|
||||||
|
@ -11,6 +11,8 @@
|
|||||||
[status-im.navigation.view :as views]
|
[status-im.navigation.view :as views]
|
||||||
[utils.re-frame :as rf]))
|
[utils.re-frame :as rf]))
|
||||||
|
|
||||||
|
(defn init
|
||||||
|
[]
|
||||||
(navigation/set-lazy-component-registrator
|
(navigation/set-lazy-component-registrator
|
||||||
(fn [screen-key]
|
(fn [screen-key]
|
||||||
(let [screen (views/screen screen-key)]
|
(let [screen (views/screen screen-key)]
|
||||||
@ -90,7 +92,7 @@
|
|||||||
(navigation/register-component
|
(navigation/register-component
|
||||||
"bottom-sheet"
|
"bottom-sheet"
|
||||||
(fn [] (gesture/gesture-handler-root-hoc views/bottom-sheet))
|
(fn [] (gesture/gesture-handler-root-hoc views/bottom-sheet))
|
||||||
(fn [] views/bottom-sheet))
|
(fn [] views/bottom-sheet)))
|
||||||
|
|
||||||
;; LEGACY (should be removed in status 2.0)
|
;; LEGACY (should be removed in status 2.0)
|
||||||
|
|
||||||
|
@ -129,12 +129,11 @@
|
|||||||
|
|
||||||
(defn open-modal
|
(defn open-modal
|
||||||
[component]
|
[component]
|
||||||
(let [{:keys [options name]} (get views/screens component)
|
(let [{:keys [options]} (get views/screens component)
|
||||||
sheet? (:sheet? options)]
|
sheet? (:sheet? options)]
|
||||||
(if @state/dissmissing
|
(if @state/dissmissing
|
||||||
(reset! state/dissmissing component)
|
(reset! state/dissmissing component)
|
||||||
(do
|
(do
|
||||||
(set-view-id name) ; TODO https://github.com/status-im/status-mobile/issues/18811
|
|
||||||
(reset! state/curr-modal true)
|
(reset! state/curr-modal true)
|
||||||
(swap! state/modals conj component)
|
(swap! state/modals conj component)
|
||||||
(navigation/show-modal
|
(navigation/show-modal
|
||||||
|
Loading…
x
Reference in New Issue
Block a user