[14429] Fix mentions (#14442)
This commit is contained in:
parent
9de4417f03
commit
3d71fdba98
|
@ -172,21 +172,21 @@
|
|||
:on-selection-change (partial on-selection-change timeout-id last-text-change mentionable-users)
|
||||
:on-change (partial on-change last-text-change timeout-id mentionable-users refs chat-id sending-image)
|
||||
:on-text-input (partial on-text-input mentionable-users chat-id)}
|
||||
input-with-mentions (<sub [:chat/input-with-mentions])
|
||||
children (fn []
|
||||
(if mentions-enabled
|
||||
(for [[index [type text]] (map-indexed
|
||||
(fn [idx item]
|
||||
[idx item])
|
||||
(<sub [:chat/input-with-mentions]))]
|
||||
^{:key (str index "_" type "_" text)}
|
||||
[rn/text (when (= type :mention) {:style {:color colors/primary-50}})
|
||||
text])
|
||||
(map-indexed
|
||||
(fn [index [item text]]
|
||||
[index [item]]
|
||||
^{:key (str index "_" type "_" text)}
|
||||
[rn/text (when (= type :mention) {:style {:color colors/primary-50}})
|
||||
text]) input-with-mentions)
|
||||
(get @input-texts chat-id)))]
|
||||
;when ios implementation for selectable-text-input is ready, we need remove this condition and use selectable-text-input directly.
|
||||
(if platform/android?
|
||||
[selectable-text-input chat-id props children]
|
||||
[rn/text-input props
|
||||
[children]])))
|
||||
children])))
|
||||
|
||||
(defn selectable-text-input-manager []
|
||||
(when (exists? (.-NativeModules react-native))
|
||||
|
|
Loading…
Reference in New Issue