From 9ffefe74bbb9690df704093dffd78401c6982e26 Mon Sep 17 00:00:00 2001 From: Parvesh Monu Date: Sun, 5 Mar 2023 22:33:45 +0530 Subject: [PATCH] fix navigation to user profile --- src/status_im/keycard/backup_key.cljs | 3 +-- src/status_im/keycard/login.cljs | 2 +- src/status_im/qr_scanner/core.cljs | 5 +++-- src/status_im/utils/universal_links/core.cljs | 5 +++-- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/status_im/keycard/backup_key.cljs b/src/status_im/keycard/backup_key.cljs index fc83048144..6a66d6504d 100644 --- a/src/status_im/keycard/backup_key.cljs +++ b/src/status_im/keycard/backup_key.cljs @@ -18,8 +18,7 @@ {:db (-> db (assoc-in [:keycard :creating-backup?] backup-type))} (when (:multiaccount db) - (navigation/change-tab :browser-stack)) ;; Profile tab - Currently browser tab is used for - ;; profile + (navigation/navigate-to-cofx :my-profile nil)) (navigation/navigate-to-cofx :seed-phrase nil))) (rf/defn recovery-card-pressed diff --git a/src/status_im/keycard/login.cljs b/src/status_im/keycard/login.cljs index a2da55a184..37627d634a 100644 --- a/src/status_im/keycard/login.cljs +++ b/src/status_im/keycard/login.cljs @@ -70,7 +70,7 @@ :status nil)) :hide-popover nil}) (when (:multiaccount db) - (navigation/change-tab :browser-stack)) ;; Profile tab - Currently browser tab is used for profile + (navigation/navigate-to-cofx :my-profile nil)) (when-not (:multiaccounts/login db) (if (:popover/popover db) (navigation/navigate-replace :keycard-pin nil) diff --git a/src/status_im/qr_scanner/core.cljs b/src/status_im/qr_scanner/core.cljs index d1acc6160e..124e9d28ed 100644 --- a/src/status_im/qr_scanner/core.cljs +++ b/src/status_im/qr_scanner/core.cljs @@ -64,8 +64,9 @@ (let [own (new-chat.db/own-public-key? db public-key)] (cond (and public-key own) - {:shell/change-tab-fx :browser-stack ;; Profile tab - Currently browser tab is used for profile - :pop-to-root-fx :shell-stack} + (rf/merge cofx + {:pop-to-root-fx :shell-stack} + (navigation/navigate-to-cofx :my-profile nil)) (and public-key (not own)) (rf/merge cofx diff --git a/src/status_im/utils/universal_links/core.cljs b/src/status_im/utils/universal_links/core.cljs index 904d3ccbf2..53c01bf570 100644 --- a/src/status_im/utils/universal_links/core.cljs +++ b/src/status_im/utils/universal_links/core.cljs @@ -109,8 +109,9 @@ (log/info "universal-links: handling view profile" public-key) (cond (and public-key (new-chat.db/own-public-key? db public-key)) - {:shell/change-tab-fx :browser-stack ;; Profile tab - Currently browser tab is used for profile - :pop-to-root-fx :shell-stack} + (rf/merge cofx + {:pop-to-root-fx :shell-stack} + (navigation/navigate-to-cofx :my-profile nil)) public-key {:dispatch [:chat.ui/show-profile public-key ens-name]}))