fix duplicate mention (#19203)
This commit is contained in:
parent
c2f0060a47
commit
5854a473f0
|
@ -14,18 +14,18 @@
|
||||||
|
|
||||||
(defn mention-tag-wrapper
|
(defn mention-tag-wrapper
|
||||||
[first-child-mention]
|
[first-child-mention]
|
||||||
{:flex-direction :row
|
{:flex-direction :row
|
||||||
:align-items :center
|
:align-items :center
|
||||||
:height (if platform/ios? 22 21)
|
:height (if platform/ios? 22 21)
|
||||||
:border-radius 6
|
:background-color colors/primary-50-opa-10
|
||||||
:transform [{:translateY (if platform/ios? (if first-child-mention 4.5 3) 4.5)}]})
|
:padding-horizontal 3
|
||||||
|
:border-radius 6
|
||||||
|
:transform [{:translateY (if platform/ios? (if first-child-mention 4.5 3) 4.5)}]})
|
||||||
|
|
||||||
(def mention-tag-text
|
(def mention-tag-text
|
||||||
{:color (colors/theme-colors colors/primary-50
|
{:color (colors/theme-colors colors/primary-50
|
||||||
colors/primary-60)
|
colors/primary-60)
|
||||||
:selection-color :transparent
|
:selection-color :transparent
|
||||||
:background-color colors/primary-50-opa-10
|
|
||||||
:padding-horizontal 3
|
|
||||||
:suppress-highlighting true})
|
:suppress-highlighting true})
|
||||||
|
|
||||||
(defn code
|
(defn code
|
||||||
|
|
|
@ -57,16 +57,14 @@
|
||||||
:mention
|
:mention
|
||||||
(conj
|
(conj
|
||||||
units
|
units
|
||||||
(let [resolved-mention (rf/sub [:messages/resolve-mention literal])]
|
[rn/pressable
|
||||||
[rn/pressable
|
{:on-press #(rf/dispatch [:chat.ui/show-profile literal])
|
||||||
{:on-press #(rf/dispatch [:chat.ui/show-profile literal])
|
:style (style/mention-tag-wrapper first-child-mention)}
|
||||||
:key resolved-mention
|
[quo/text
|
||||||
:style (style/mention-tag-wrapper first-child-mention)}
|
{:weight :medium
|
||||||
[quo/text
|
:style style/mention-tag-text
|
||||||
{:weight :medium
|
:size :paragraph-1}
|
||||||
:style style/mention-tag-text
|
(rf/sub [:messages/resolve-mention literal])]])
|
||||||
:size :paragraph-1}
|
|
||||||
resolved-mention]]))
|
|
||||||
|
|
||||||
:edited
|
:edited
|
||||||
(conj units
|
(conj units
|
||||||
|
@ -108,6 +106,7 @@
|
||||||
(render-inline acc e chat-id style-override mention-first))
|
(render-inline acc e chat-id style-override mention-first))
|
||||||
[quo/text
|
[quo/text
|
||||||
{:size :paragraph-1
|
{:size :paragraph-1
|
||||||
|
:key (rand-int 1000000) ;; https://github.com/status-im/status-mobile/pull/19203
|
||||||
:style {:margin-bottom (if mention-first (if platform/ios? 4 0) 2)
|
:style {:margin-bottom (if mention-first (if platform/ios? 4 0) 2)
|
||||||
:margin-top (if mention-first (if platform/ios? -4 0) -1)
|
:margin-top (if mention-first (if platform/ios? -4 0) -1)
|
||||||
:color (when (seq style-override) colors/white)
|
:color (when (seq style-override) colors/white)
|
||||||
|
|
Loading…
Reference in New Issue