[#7799] fix chat does not scroll if touch starts on top of datemark

Signed-off-by: Igor Mandrigin <i@mandrigin.ru>
This commit is contained in:
bitsikka 2019-03-21 23:45:03 +05:45 committed by Igor Mandrigin
parent 9537425cf2
commit 22bd2f1761
No known key found for this signature in database
GPG Key ID: 4A0EDDE26E66BC8B
3 changed files with 19 additions and 1 deletions

View File

@ -1,5 +1,6 @@
(ns status-im.ui.screens.chat.message.datemark (ns status-im.ui.screens.chat.message.datemark
(:require [status-im.ui.components.react :as react] (:require [status-im.ui.components.react :as react]
[re-frame.core :as re-frame]
[clojure.string :as string] [clojure.string :as string]
[status-im.ui.screens.chat.styles.message.datemark :as style])) [status-im.ui.screens.chat.styles.message.datemark :as style]))
@ -8,3 +9,14 @@
[react/view style/datemark [react/view style/datemark
[react/text {:style style/datemark-text} [react/text {:style style/datemark-text}
(string/capitalize value)]]]) (string/capitalize value)]]])
(defn chat-datemark-mobile [value]
[react/touchable-without-feedback
{:on-press (fn [_]
(re-frame/dispatch
[:chat.ui/set-chat-ui-props {:messages-focused? true
:show-stickers? false}])
(react/dismiss-keyboard!))}
[react/view style/datemark-mobile
[react/text {:style style/datemark-text}
(string/capitalize value)]]])

View File

@ -10,5 +10,11 @@
{:margin-top 16 {:margin-top 16
:height 22}) :height 22})
(def datemark-mobile
{:flex 1
:align-items :center
:margin-top 16
:height 22})
(def datemark-text (def datemark-text
{:color colors/gray}) {:color colors/gray})

View File

@ -68,7 +68,7 @@
(defmethod message-row :datemark (defmethod message-row :datemark
[{{:keys [value]} :row}] [{{:keys [value]} :row}]
[message-datemark/chat-datemark value]) [message-datemark/chat-datemark-mobile value])
(defmethod message-row :default (defmethod message-row :default
[{:keys [group-chat current-public-key modal? row]}] [{:keys [group-chat current-public-key modal? row]}]