fix Unable to tap on chats/channels after opening profile link (#21643)
This commit is contained in:
parent
c6c3e089ca
commit
fa0777e25e
|
@ -62,7 +62,7 @@
|
||||||
(cond
|
(cond
|
||||||
(and public-key own)
|
(and public-key own)
|
||||||
(rf/merge cofx
|
(rf/merge cofx
|
||||||
{:pop-to-root-fx :shell-stack}
|
(navigation/pop-to-root :shell-stack)
|
||||||
(navigation/navigate-to :my-profile nil))
|
(navigation/navigate-to :my-profile nil))
|
||||||
|
|
||||||
(and public-key (not own))
|
(and public-key (not own))
|
||||||
|
|
|
@ -74,7 +74,7 @@
|
||||||
(cond
|
(cond
|
||||||
(and public-key (own-public-key? db public-key))
|
(and public-key (own-public-key? db public-key))
|
||||||
(rf/merge cofx
|
(rf/merge cofx
|
||||||
{:pop-to-root-fx :shell-stack}
|
(navigation/pop-to-root :shell-stack)
|
||||||
(navigation/navigate-to :settings nil))
|
(navigation/navigate-to :settings nil))
|
||||||
|
|
||||||
public-key
|
public-key
|
||||||
|
|
|
@ -103,7 +103,13 @@
|
||||||
:background :blur
|
:background :blur
|
||||||
:size 32
|
:size 32
|
||||||
:accessibility-label :back-button
|
: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)]
|
(if (= chat-type constants/community-chat-type) :i/arrow-left :i/close)]
|
||||||
[header-content-container chat]
|
[header-content-container chat]
|
||||||
[quo/button
|
[quo/button
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
[clojure.string :as string]
|
[clojure.string :as string]
|
||||||
[re-frame.core :as re-frame]
|
[re-frame.core :as re-frame]
|
||||||
[react-native.core :as react]
|
[react-native.core :as react]
|
||||||
|
[react-native.platform :as platform]
|
||||||
[utils.re-frame :as rf]
|
[utils.re-frame :as rf]
|
||||||
[utils.url :as url]))
|
[utils.url :as url]))
|
||||||
|
|
||||||
|
@ -50,7 +51,8 @@
|
||||||
{:events [:navigate-back]}
|
{:events [:navigate-back]}
|
||||||
[{:keys [db]}]
|
[{:keys [db]}]
|
||||||
{:fx [[:navigate-back nil]
|
{: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]])]})
|
[:dispatch [:chat/close]])]})
|
||||||
|
|
||||||
(rf/defn navigate-back-to
|
(rf/defn navigate-back-to
|
||||||
|
|
Loading…
Reference in New Issue