[mentions] Open profile tab instead of user profile view on pressing own mention
This commit is contained in:
parent
89ad4f59d0
commit
72daf93a75
|
@ -282,6 +282,17 @@
|
||||||
(i18n/label :cooldown/warning-message)
|
(i18n/label :cooldown/warning-message)
|
||||||
#())))
|
#())))
|
||||||
|
|
||||||
|
(fx/defn show-profile-without-adding-contact
|
||||||
|
{:events [:chat.ui/show-profile-without-adding-contact]}
|
||||||
|
[{:keys [db] :as cofx} identity]
|
||||||
|
(let [my-public-key (get-in db [:multiaccount :public-key])]
|
||||||
|
(if (= my-public-key identity)
|
||||||
|
(navigation/navigate-to-cofx cofx :my-profile nil)
|
||||||
|
(fx/merge
|
||||||
|
cofx
|
||||||
|
{:db (assoc db :contacts/identity identity)}
|
||||||
|
(navigation/navigate-to-cofx :profile nil)))))
|
||||||
|
|
||||||
(fx/defn show-profile
|
(fx/defn show-profile
|
||||||
{:events [:chat.ui/show-profile]}
|
{:events [:chat.ui/show-profile]}
|
||||||
[cofx identity]
|
[cofx identity]
|
||||||
|
|
|
@ -90,7 +90,7 @@
|
||||||
outgoing colors/mention-outgoing
|
outgoing colors/mention-outgoing
|
||||||
:else colors/mention-incoming)}
|
:else colors/mention-incoming)}
|
||||||
:on-press (when-not (= content-type constants/content-type-system-text)
|
:on-press (when-not (= content-type constants/content-type-system-text)
|
||||||
#(re-frame/dispatch [:chat.ui/show-profile literal]))}
|
#(re-frame/dispatch [:chat.ui/show-profile-without-adding-contact literal]))}
|
||||||
[mention-element literal]])
|
[mention-element literal]])
|
||||||
"status-tag"
|
"status-tag"
|
||||||
(conj acc [react/text-class
|
(conj acc [react/text-class
|
||||||
|
|
Loading…
Reference in New Issue