[15612] Only allow showing universal links after clicking start using status (#15786)
This commit is contained in:
parent
c78bdda717
commit
ab973076eb
|
@ -148,7 +148,8 @@
|
||||||
|
|
||||||
(rf/defn on-return-from-background
|
(rf/defn on-return-from-background
|
||||||
[{:keys [db now] :as cofx}]
|
[{:keys [db now] :as cofx}]
|
||||||
(let [app-in-background-since (get db :app-in-background-since)
|
(let [new-account? (get db :onboarding-2/new-account?)
|
||||||
|
app-in-background-since (get db :app-in-background-since)
|
||||||
signed-up? (get-in db [:multiaccount :signed-up?])
|
signed-up? (get-in db [:multiaccount :signed-up?])
|
||||||
biometric-auth? (= (:auth-method db) "biometric")
|
biometric-auth? (= (:auth-method db) "biometric")
|
||||||
requires-bio-auth (and
|
requires-bio-auth (and
|
||||||
|
@ -161,7 +162,8 @@
|
||||||
{:db (dissoc db :app-in-background-since)}
|
{:db (dissoc db :app-in-background-since)}
|
||||||
(mailserver/process-next-messages-request)
|
(mailserver/process-next-messages-request)
|
||||||
(wallet/restart-wallet-service-after-background app-in-background-since)
|
(wallet/restart-wallet-service-after-background app-in-background-since)
|
||||||
(universal-links/process-stored-event)
|
(when-not new-account?
|
||||||
|
(universal-links/process-stored-event))
|
||||||
#(when-let [chat-id (:current-chat-id db)]
|
#(when-let [chat-id (:current-chat-id db)]
|
||||||
{:dispatch [:chat/mark-all-as-read chat-id]})
|
{:dispatch [:chat/mark-all-as-read chat-id]})
|
||||||
#(when requires-bio-auth
|
#(when requires-bio-auth
|
||||||
|
|
|
@ -45,11 +45,13 @@
|
||||||
{:events [::messenger-started]}
|
{:events [::messenger-started]}
|
||||||
[{:keys [db] :as cofx} {:keys [mailservers] :as response}]
|
[{:keys [db] :as cofx} {:keys [mailservers] :as response}]
|
||||||
(log/info "Messenger started")
|
(log/info "Messenger started")
|
||||||
(rf/merge cofx
|
(let [new-account? (get db :onboarding-2/new-account?)]
|
||||||
{:db (-> db
|
(rf/merge cofx
|
||||||
(assoc :messenger/started? true)
|
{:db (-> db
|
||||||
(add-mailservers mailservers))}
|
(assoc :messenger/started? true)
|
||||||
(fetch-node-info-fx)
|
(add-mailservers mailservers))}
|
||||||
(pairing/init)
|
(fetch-node-info-fx)
|
||||||
(stickers/load-packs)
|
(pairing/init)
|
||||||
(universal-links/process-stored-event)))
|
(stickers/load-packs)
|
||||||
|
(when-not new-account?
|
||||||
|
(universal-links/process-stored-event)))))
|
||||||
|
|
|
@ -184,6 +184,7 @@
|
||||||
|
|
||||||
(rf/defn process-stored-event
|
(rf/defn process-stored-event
|
||||||
"Return an event description for processing a url if in the database"
|
"Return an event description for processing a url if in the database"
|
||||||
|
{:events [:universal-links/process-stored-event]}
|
||||||
[{:keys [db] :as cofx}]
|
[{:keys [db] :as cofx}]
|
||||||
(when-let [url (:universal-links/url db)]
|
(when-let [url (:universal-links/url db)]
|
||||||
(rf/merge cofx
|
(rf/merge cofx
|
||||||
|
|
|
@ -46,7 +46,9 @@
|
||||||
"Illustration here"]]
|
"Illustration here"]]
|
||||||
[rn/view {:style (style/buttons insets)}
|
[rn/view {:style (style/buttons insets)}
|
||||||
[quo/button
|
[quo/button
|
||||||
{:on-press #(rf/dispatch [:init-root :shell-stack])
|
{:on-press (fn []
|
||||||
|
(rf/dispatch [:init-root :shell-stack])
|
||||||
|
(rf/dispatch [:universal-links/process-stored-event]))
|
||||||
:type :primary
|
:type :primary
|
||||||
:accessibility-label :welcome-button
|
:accessibility-label :welcome-button
|
||||||
:override-background-color (colors/custom-color profile-color 60)}
|
:override-background-color (colors/custom-color profile-color 60)}
|
||||||
|
|
Loading…
Reference in New Issue