Implement navigation to profiles and chats from contact requests inside Activity Center (#19902)
This commit is contained in:
parent
07fb3610d1
commit
10f5f9ec7d
|
@ -12,11 +12,17 @@
|
|||
(defn user-avatar-tag
|
||||
[user-id]
|
||||
(let [profile (rf/sub [:contacts/contact-by-identity user-id])]
|
||||
[quo/context-tag
|
||||
{:blur? true
|
||||
:size 24
|
||||
:full-name (profile.utils/displayed-name profile)
|
||||
:profile-picture (profile.utils/photo profile)}]))
|
||||
[rn/view
|
||||
{:on-start-should-set-responder
|
||||
(fn [_event]
|
||||
(rf/dispatch [:navigate-back])
|
||||
(rf/dispatch [:chat.ui/show-profile user-id])
|
||||
true)}
|
||||
[quo/context-tag
|
||||
{:blur? true
|
||||
:size 24
|
||||
:full-name (profile.utils/displayed-name profile)
|
||||
:profile-picture (profile.utils/photo profile)}]]))
|
||||
|
||||
(defn- render-swipe-action
|
||||
[{:keys [active-swipeable
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
(ns status-im.contexts.shell.activity-center.notification.contact-requests.view
|
||||
(:require
|
||||
[quo.core :as quo]
|
||||
[react-native.gesture :as gesture]
|
||||
[react-native.core :as rn]
|
||||
[status-im.constants :as constants]
|
||||
[status-im.contexts.shell.activity-center.notification.common.style :as common-style]
|
||||
[status-im.contexts.shell.activity-center.notification.common.view :as common]
|
||||
|
@ -162,10 +162,8 @@
|
|||
[outgoing-contact-request-view props app-theme]
|
||||
|
||||
(= contact-request-state constants/contact-request-message-state-accepted)
|
||||
[gesture/touchable-without-feedback
|
||||
{:on-press (fn []
|
||||
(rf/dispatch [:hide-popover])
|
||||
(rf/dispatch [:chat.ui/start-chat author]))}
|
||||
[rn/pressable
|
||||
{:on-press #(rf/dispatch [:chat.ui/start-chat author])}
|
||||
[incoming-contact-request-view props app-theme]]
|
||||
|
||||
:else
|
||||
|
|
Loading…
Reference in New Issue