[#12443] long press is long and it makes the message disappear entirely

Signed-off-by: andrey <motor4ik@gmail.com>
This commit is contained in:
andrey 2021-08-13 10:35:15 +02:00
parent d1666a42de
commit f031d2b32d
No known key found for this signature in database
GPG Key ID: 89B67245FD2F0272
3 changed files with 13 additions and 9 deletions

View File

@ -418,6 +418,7 @@
(when-not modal (when-not modal
{:on-press (fn [_] {:on-press (fn [_]
(react/dismiss-keyboard!)) (react/dismiss-keyboard!))
:delay-long-press 100
:on-long-press (fn [] :on-long-press (fn []
(if @collapsed? (if @collapsed?
(do (reset! collapsed? false) (do (reset! collapsed? false)
@ -488,6 +489,7 @@
{:disabled in-popover? {:disabled in-popover?
:on-press (fn [] :on-press (fn []
(react/dismiss-keyboard!)) (react/dismiss-keyboard!))
:delay-long-press 100
:on-long-press (fn [] :on-long-press (fn []
(on-long-press (on-long-press
(concat (concat
@ -521,6 +523,7 @@
(when pack (when pack
(re-frame/dispatch [:stickers/open-sticker-pack pack])) (re-frame/dispatch [:stickers/open-sticker-pack pack]))
(react/dismiss-keyboard!)) (react/dismiss-keyboard!))
:delay-long-press 100
:on-long-press (fn [] :on-long-press (fn []
(on-long-press (on-long-press
(when-not outgoing (when-not outgoing
@ -537,6 +540,7 @@
[message-content-wrapper message [message-content-wrapper message
[message-content-image message {:modal modal [message-content-image message {:modal modal
:disabled in-popover? :disabled in-popover?
:delay-long-press 100
:on-long-press (fn [] :on-long-press (fn []
(on-long-press (on-long-press
[{:on-press #(re-frame/dispatch [:chat.ui/reply-to-message message]) [{:on-press #(re-frame/dispatch [:chat.ui/reply-to-message message])

View File

@ -63,7 +63,6 @@
(reset! visible true))] (reset! visible true))]
[:<> [:<>
[rn/view {:ref ref [rn/view {:ref ref
:style {:opacity (if @visible 0 1)}
:collapsable false} :collapsable false}
[render message {:modal false [render message {:modal false
:on-long-press (fn [act] :on-long-press (fn [act]

View File

@ -122,6 +122,7 @@
:border-bottom-right-radius (if timeline 16 (if outgoing 4 16)) :border-bottom-right-radius (if timeline 16 (if outgoing 4 16))
:border-width 1 :border-width 1
:border-color components.colors/gray-lighter :border-color components.colors/gray-lighter
:background-color components.colors/white
:margin-vertical 4}) :margin-vertical 4})
(def screen-width (def screen-width