Restrict message size on input
Signed-off-by: Volodymyr Kozieiev <vkjr.sp@gmail.com>
This commit is contained in:
parent
17c408bd06
commit
0ab227eef8
|
@ -12,3 +12,5 @@
|
||||||
{1 2000
|
{1 2000
|
||||||
2 5000
|
2 5000
|
||||||
3 10000})
|
3 10000})
|
||||||
|
|
||||||
|
(def max-text-size 4096)
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
[quo.design-system.colors :as colors]
|
[quo.design-system.colors :as colors]
|
||||||
[status-im.ui.screens.chat.components.style :as styles]
|
[status-im.ui.screens.chat.components.style :as styles]
|
||||||
[status-im.ui.screens.chat.components.reply :as reply]
|
[status-im.ui.screens.chat.components.reply :as reply]
|
||||||
|
[status-im.chat.constants :as chat.constants]
|
||||||
[status-im.utils.utils :as utils.utils]
|
[status-im.utils.utils :as utils.utils]
|
||||||
[quo.components.animated.pressable :as pressable]
|
[quo.components.animated.pressable :as pressable]
|
||||||
[quo.animated :as animated]
|
[quo.animated :as animated]
|
||||||
|
@ -86,6 +87,7 @@
|
||||||
:auto-focus false
|
:auto-focus false
|
||||||
:on-focus #(set-active-panel nil)
|
:on-focus #(set-active-panel nil)
|
||||||
:on-change #(on-text-change (.-text ^js (.-nativeEvent ^js %)))
|
:on-change #(on-text-change (.-text ^js (.-nativeEvent ^js %)))
|
||||||
|
:max-length chat.constants/max-text-size
|
||||||
:placeholder-text-color (:text-02 @colors/theme)
|
:placeholder-text-color (:text-02 @colors/theme)
|
||||||
:placeholder (if cooldown-enabled?
|
:placeholder (if cooldown-enabled?
|
||||||
(i18n/label :cooldown/text-input-disabled)
|
(i18n/label :cooldown/text-input-disabled)
|
||||||
|
|
Loading…
Reference in New Issue