remove outdated :initial-props

Signed-off-by: andrey <motor4ik@gmail.com>
This commit is contained in:
andrey 2021-01-21 16:01:37 +01:00
parent 08b9cfcf52
commit 35671226e4
No known key found for this signature in database
GPG Key ID: 89B67245FD2F0272
7 changed files with 7 additions and 21 deletions

View File

@ -51,7 +51,7 @@
(defn root [_] (defn root [_]
(reagent/create-class (reagent/create-class
{:component-did-mount {:component-did-mount
(fn [this] (fn [_]
(.addListener ^js react/keyboard (.addListener ^js react/keyboard
(if platform/ios? (if platform/ios?
"keyboardWillShow" "keyboardWillShow"
@ -71,7 +71,6 @@
(.addEventListener react-native-shake (.addEventListener react-native-shake
"ShakeEvent" "ShakeEvent"
on-shake) on-shake)
(re-frame/dispatch [:set-initial-props (reagent/props this)])
(.hide ^js splash-screen)) (.hide ^js splash-screen))
:component-will-unmount :component-will-unmount
(fn [] (fn []

View File

@ -32,7 +32,6 @@
:chat/last-outgoing-message-sent-at 0 :chat/last-outgoing-message-sent-at 0
:chat/spam-messages-frequency 0 :chat/spam-messages-frequency 0
:tooltips {} :tooltips {}
:initial-props {}
:dimensions/window (dimensions/window) :dimensions/window (dimensions/window)
:registry {} :registry {}
:stickers/packs-owned #{} :stickers/packs-owned #{}

View File

@ -888,11 +888,6 @@
(fn [cofx [_ installation-id metadata]] (fn [cofx [_ installation-id metadata]]
(pairing/update-installation cofx installation-id metadata))) (pairing/update-installation cofx installation-id metadata)))
(handlers/register-handler-fx
:set-initial-props
(fn [cofx [_ initial-props]]
{:db (assoc (:db cofx) :initial-props initial-props)}))
(handlers/register-handler-fx (handlers/register-handler-fx
:pairing.ui/enable-installation-pressed :pairing.ui/enable-installation-pressed
(fn [cofx [_ installation-id]] (fn [cofx [_ installation-id]]

View File

@ -11,11 +11,10 @@
(fx/defn initialize-app-db (fx/defn initialize-app-db
"Initialize db to initial state" "Initialize db to initial state"
[{{:keys [keycard initial-props supported-biometric-auth app-active-since] [{{:keys [keycard supported-biometric-auth app-active-since]
:network/keys [type]} :db :network/keys [type]} :db
now :now}] now :now}]
{:db (assoc app-db {:db (assoc app-db
:initial-props initial-props
:network/type type :network/type type
:keycard (dissoc keycard :secrets) :keycard (dissoc keycard :secrets)
:supported-biometric-auth supported-biometric-auth :supported-biometric-auth supported-biometric-auth

View File

@ -50,15 +50,11 @@
les-topic (assoc les-topic {:Min 2, :Max 2})))) les-topic (assoc les-topic {:Min 2, :Max 2}))))
(defn- get-base-node-config [config] (defn- get-base-node-config [config]
(let [initial-props @(re-frame/subscribe [:initial-props]) (cond-> (assoc config
status-node-port (get initial-props :STATUS_NODE_PORT)] :Name "StatusIM")
(cond-> (assoc config config/dev-build?
:Name "StatusIM") (assoc :ListenAddr ":30304"
config/dev-build? :DataDir (str (:DataDir config) "_dev"))))
(assoc :ListenAddr ":30304"
:DataDir (str (:DataDir config) "_dev"))
status-node-port
(assoc :ListenAddr (str ":" status-node-port)))))
(defn- pick-nodes (defn- pick-nodes
"Picks `limit` different nodes randomly from the list of nodes "Picks `limit` different nodes randomly from the list of nodes

View File

@ -70,7 +70,6 @@
(reg-root-key-sub :about-app/node-info :node-info) (reg-root-key-sub :about-app/node-info :node-info)
(reg-root-key-sub :peers-summary :peers-summary) (reg-root-key-sub :peers-summary :peers-summary)
(reg-root-key-sub :dimensions/window :dimensions/window) (reg-root-key-sub :dimensions/window :dimensions/window)
(reg-root-key-sub :initial-props :initial-props)
(reg-root-key-sub :fleets/custom-fleets :custom-fleets) (reg-root-key-sub :fleets/custom-fleets :custom-fleets)
(reg-root-key-sub :animations :animations) (reg-root-key-sub :animations :animations)
(reg-root-key-sub :ui/search :ui/search) (reg-root-key-sub :ui/search :ui/search)

View File

@ -60,7 +60,6 @@
;; TODO: Add message explaining db export ;; TODO: Add message explaining db export
(let [db-json (types/clj->json (select-keys db [:app-state (let [db-json (types/clj->json (select-keys db [:app-state
:current-chat-id :current-chat-id
:initial-props
:keyboard-height :keyboard-height
:keyboard-max-height :keyboard-max-height
:network :network