Skip to content

Commit

Permalink
Implement navigation to profiles and chats from contact requests insi…
Browse files Browse the repository at this point in the history
…de Activity Center
  • Loading branch information
Parveshdhull committed May 5, 2024
1 parent 8a24185 commit 35e7515
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,14 @@
(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 [: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
Expand Down
Original file line number Diff line number Diff line change
@@ -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]
Expand Down Expand Up @@ -158,10 +158,8 @@
[outgoing-contact-request-view props]

(= 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]]

:else
Expand Down

0 comments on commit 35e7515

Please sign in to comment.