fix chat long tap not working with input focused

This commit is contained in:
Gustavo Nunes 2017-05-03 01:16:12 -03:00 committed by Roman Volosovskyi
parent ddb6344dca
commit 6e5c8d91dd
2 changed files with 6 additions and 3 deletions

View File

@ -167,7 +167,7 @@
:renderScrollComponent #(invertible-scroll-view (js->clj %))
:onEndReached (when-not loaded? #(dispatch [:load-more-messages]))
:enableEmptySections true
:keyboardShouldPersistTaps (if platform/android? :always :never)
:keyboardShouldPersistTaps (if platform/android? :always :handled)
:dataSource (to-datasource-inverted messages)}]))
(defview chat []

View File

@ -11,7 +11,8 @@
touchable-without-feedback
touchable-highlight
autolink
get-dimensions]]
get-dimensions
dismiss-keyboard!]]
[status-im.components.animation :as anim]
[status-im.chat.constants :as chat-consts]
[status-im.components.list-selection :refer [share browse]]
@ -31,6 +32,7 @@
[status-im.components.chat-icon.screen :refer [chat-icon-message-status]]
[status-im.utils.identicon :refer [identicon]]
[status-im.utils.gfycat.core :refer [generate-gfy]]
[status-im.utils.platform :as platform]
[status-im.i18n :refer [label
get-contact-translated]]
[status-im.chat.utils :as cu]
@ -389,7 +391,8 @@
:reagent-render
(fn [{:keys [outgoing group-chat content-type content] :as message}]
[message-container message
[touchable-highlight {:on-long-press (when (= content-type text-content-type)
[touchable-highlight {:on-press #(when platform/ios? (dismiss-keyboard!))
:on-long-press (when (= content-type text-content-type)
#(share content (label :t/message)))}
[view
(let [incoming-group (and group-chat (not outgoing))]