fix Unable to tap on chats/channels after opening profile link
This commit is contained in:
parent
58476a43da
commit
96f82189a1
|
@ -62,7 +62,7 @@
|
|||
(cond
|
||||
(and public-key own)
|
||||
(rf/merge cofx
|
||||
{:pop-to-root-fx :shell-stack}
|
||||
(navigation/pop-to-root :shell-stack)
|
||||
(navigation/navigate-to :my-profile nil))
|
||||
|
||||
(and public-key (not own))
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
(cond
|
||||
(and public-key (own-public-key? db public-key))
|
||||
(rf/merge cofx
|
||||
{:pop-to-root-fx :shell-stack}
|
||||
(navigation/pop-to-root :shell-stack)
|
||||
(navigation/navigate-to :settings nil))
|
||||
|
||||
public-key
|
||||
|
|
|
@ -103,7 +103,13 @@
|
|||
:background :blur
|
||||
:size 32
|
||||
:accessibility-label :back-button
|
||||
:on-press #(rf/dispatch [:navigate-back])}
|
||||
:on-press (fn []
|
||||
(rf/dispatch [:navigate-back])
|
||||
;; In IOS view-id might be incorrect (if screen closed using swipe),
|
||||
;; so we can't rely on `:navigate-back` to close the chat.
|
||||
;; https://github.com/status-im/status-mobile/pull/21643#issuecomment-248896204451
|
||||
(when platform/ios?
|
||||
(rf/dispatch [:chat/close])))}
|
||||
(if (= chat-type constants/community-chat-type) :i/arrow-left :i/close)]
|
||||
[header-content-container chat]
|
||||
[quo/button
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
[clojure.string :as string]
|
||||
[re-frame.core :as re-frame]
|
||||
[react-native.core :as react]
|
||||
[react-native.platform :as platform]
|
||||
[utils.re-frame :as rf]
|
||||
[utils.url :as url]))
|
||||
|
||||
|
@ -50,7 +51,8 @@
|
|||
{:events [:navigate-back]}
|
||||
[{:keys [db]}]
|
||||
{:fx [[:navigate-back nil]
|
||||
(when (= (:view-id db) :chat)
|
||||
;; Required for navigating back using the Android hardware back button
|
||||
(when (and platform/android? (= (:view-id db) :chat))
|
||||
[:dispatch [:chat/close]])]})
|
||||
|
||||
(rf/defn navigate-back-to
|
||||
|
|
Loading…
Reference in New Issue