Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix duplicate mention #19203

Merged
merged 1 commit into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@

(defn mention-tag-wrapper
[first-child-mention]
{:flex-direction :row
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert of #19076

:align-items :center
:height (if platform/ios? 22 21)
:border-radius 6
:transform [{:translateY (if platform/ios? (if first-child-mention 4.5 3) 4.5)}]})
{:flex-direction :row
:align-items :center
:height (if platform/ios? 22 21)
:background-color colors/primary-50-opa-10
:padding-horizontal 3
:border-radius 6
:transform [{:translateY (if platform/ios? (if first-child-mention 4.5 3) 4.5)}]})

(def mention-tag-text
{:color (colors/theme-colors colors/primary-50
colors/primary-60)
:selection-color :transparent
:background-color colors/primary-50-opa-10
:padding-horizontal 3
:suppress-highlighting true})

(defn code
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,14 @@
:mention
(conj
units
(let [resolved-mention (rf/sub [:messages/resolve-mention literal])]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert of #19076

[rn/pressable
{:on-press #(rf/dispatch [:chat.ui/show-profile literal])
:key resolved-mention
:style (style/mention-tag-wrapper first-child-mention)}
[quo/text
{:weight :medium
:style style/mention-tag-text
:size :paragraph-1}
resolved-mention]]))
[rn/pressable
{:on-press #(rf/dispatch [:chat.ui/show-profile literal])
:style (style/mention-tag-wrapper first-child-mention)}
[quo/text
{:weight :medium
:style style/mention-tag-text
:size :paragraph-1}
(rf/sub [:messages/resolve-mention literal])]])

:edited
(conj units
Expand Down Expand Up @@ -108,6 +106,7 @@
(render-inline acc e chat-id style-override mention-first))
[quo/text
{:size :paragraph-1
:key (rand-int 1000000) ;; https://github.com/status-im/status-mobile/pull/19203
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only this change is new

:style {:margin-bottom (if mention-first (if platform/ios? 4 0) 2)
:margin-top (if mention-first (if platform/ios? -4 0) -1)
:color (when (seq style-override) colors/white)
Expand Down