[15612] Only allow showing universal links after clicking start using status (#15786)

This commit is contained in:
Ibrahem Khalil 2023-05-09 10:49:25 +03:00 committed by GitHub
parent c78bdda717
commit ab973076eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 11 deletions

View File

@ -148,7 +148,8 @@
(rf/defn on-return-from-background
[{: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?])
biometric-auth? (= (:auth-method db) "biometric")
requires-bio-auth (and
@ -161,7 +162,8 @@
{:db (dissoc db :app-in-background-since)}
(mailserver/process-next-messages-request)
(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)]
{:dispatch [:chat/mark-all-as-read chat-id]})
#(when requires-bio-auth

View File

@ -45,11 +45,13 @@
{:events [::messenger-started]}
[{:keys [db] :as cofx} {:keys [mailservers] :as response}]
(log/info "Messenger started")
(rf/merge cofx
{:db (-> db
(assoc :messenger/started? true)
(add-mailservers mailservers))}
(fetch-node-info-fx)
(pairing/init)
(stickers/load-packs)
(universal-links/process-stored-event)))
(let [new-account? (get db :onboarding-2/new-account?)]
(rf/merge cofx
{:db (-> db
(assoc :messenger/started? true)
(add-mailservers mailservers))}
(fetch-node-info-fx)
(pairing/init)
(stickers/load-packs)
(when-not new-account?
(universal-links/process-stored-event)))))

View File

@ -184,6 +184,7 @@
(rf/defn process-stored-event
"Return an event description for processing a url if in the database"
{:events [:universal-links/process-stored-event]}
[{:keys [db] :as cofx}]
(when-let [url (:universal-links/url db)]
(rf/merge cofx

View File

@ -46,7 +46,9 @@
"Illustration here"]]
[rn/view {:style (style/buttons insets)}
[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
:accessibility-label :welcome-button
:override-background-color (colors/custom-color profile-color 60)}