Skip to content

Commit b1be292

Browse files
committed
Do not show open profile on own messages
1 parent 1dd9877 commit b1be292

File tree

2 files changed

+21
-21
lines changed

2 files changed

+21
-21
lines changed

src/status_im/ui/screens/chat/message/sheets.cljs

-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
(re-frame/dispatch [:bottom-sheet/hide-sheet])
5252
(list-selection/open-share {:message (:text content)}))}])]))
5353

54-
5554
(defn sticker-long-press [{:keys [message-id]}]
5655
(fn []
5756
[react/view

src/status_im/ui/screens/chat/sheets.cljs

+21-20
Original file line numberDiff line numberDiff line change
@@ -142,19 +142,20 @@
142142
:accessibility-label :delete-transaction-button
143143
:on-press #(hide-sheet-and-dispatch [:chat.ui/delete-message chat-id message-id])}]]))
144144

145-
(defn message-long-press [{:keys [message-id content identicon from]}]
145+
(defn message-long-press [{:keys [message-id content identicon from outgoing]}]
146146
(fn []
147147
(let [{:keys [ens-name alias]} @(re-frame/subscribe [:contacts/contact-name-by-identity from])]
148148
[react/view
149-
[list-item/list-item
150-
{:theme :action
151-
:icon (multiaccounts/displayed-photo {:identicon identicon
152-
:public-key from})
153-
:title [view-profile {:name (or ens-name alias)
154-
:helper :t/view-profile}]
155-
:accessibility-label :view-chat-details-button
156-
:accessories [:chevron]
157-
:on-press #(hide-sheet-and-dispatch [:chat.ui/show-profile from])}]
149+
(when-not outgoing
150+
[list-item/list-item
151+
{:theme :action
152+
:icon (multiaccounts/displayed-photo {:identicon identicon
153+
:public-key from})
154+
:title [view-profile {:name (or ens-name alias)
155+
:helper :t/view-profile}]
156+
:accessibility-label :view-chat-details-button
157+
:accessories [:chevron]
158+
:on-press #(hide-sheet-and-dispatch [:chat.ui/show-profile from])}])
158159
[list-item/list-item
159160
{:theme :action
160161
:title :t/message-reply
@@ -179,13 +180,13 @@
179180
(defn sticker-long-press [{:keys [from identicon]}]
180181
(fn []
181182
(let [{:keys [ens-name alias]} @(re-frame/subscribe [:contacts/contact-name-by-identity from])]
182-
[react/view
183-
[list-item/list-item
184-
{:theme :action
185-
:icon (multiaccounts/displayed-photo {:identicon identicon
186-
:public-key from})
187-
:title [view-profile {:name (or ens-name alias)
188-
:helper :t/view-profile}]
189-
:accessibility-label :view-chat-details-button
190-
:accessories [:chevron]
191-
:on-press #(hide-sheet-and-dispatch [:chat.ui/show-profile from])}]])))
183+
[react/view
184+
[list-item/list-item
185+
{:theme :action
186+
:icon (multiaccounts/displayed-photo {:identicon identicon
187+
:public-key from})
188+
:title [view-profile {:name (or ens-name alias)
189+
:helper :t/view-profile}]
190+
:accessibility-label :view-chat-details-button
191+
:accessories [:chevron]
192+
:on-press #(hide-sheet-and-dispatch [:chat.ui/show-profile from])}]])))

0 commit comments

Comments
 (0)