mirror of
https://github.com/status-im/status-react.git
synced 2025-01-27 19:26:05 +00:00
[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-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-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)}
|
:on-text-input (partial on-text-input mentionable-users chat-id)}
|
||||||
|
input-with-mentions (<sub [:chat/input-with-mentions])
|
||||||
children (fn []
|
children (fn []
|
||||||
(if mentions-enabled
|
(if mentions-enabled
|
||||||
(for [[index [type text]] (map-indexed
|
(map-indexed
|
||||||
(fn [idx item]
|
(fn [index [item text]]
|
||||||
[idx item])
|
[index [item]]
|
||||||
(<sub [:chat/input-with-mentions]))]
|
^{:key (str index "_" type "_" text)}
|
||||||
^{:key (str index "_" type "_" text)}
|
[rn/text (when (= type :mention) {:style {:color colors/primary-50}})
|
||||||
[rn/text (when (= type :mention) {:style {:color colors/primary-50}})
|
text]) input-with-mentions)
|
||||||
text])
|
|
||||||
(get @input-texts chat-id)))]
|
(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.
|
;when ios implementation for selectable-text-input is ready, we need remove this condition and use selectable-text-input directly.
|
||||||
(if platform/android?
|
(if platform/android?
|
||||||
[selectable-text-input chat-id props children]
|
[selectable-text-input chat-id props children]
|
||||||
[rn/text-input props
|
[rn/text-input props
|
||||||
[children]])))
|
children])))
|
||||||
|
|
||||||
(defn selectable-text-input-manager []
|
(defn selectable-text-input-manager []
|
||||||
(when (exists? (.-NativeModules react-native))
|
(when (exists? (.-NativeModules react-native))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user