[8452] remove scroll-view hack
Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
This commit is contained in:
parent
119c5303a4
commit
ed050f30a6
|
@ -1,9 +1,6 @@
|
||||||
(ns status-im.ui.screens.chat.styles.main
|
(ns status-im.ui.screens.chat.styles.main
|
||||||
(:require [status-im.ui.components.colors :as colors]))
|
(:require [status-im.ui.components.colors :as colors]))
|
||||||
|
|
||||||
(def scroll-root
|
|
||||||
{:flex 1})
|
|
||||||
|
|
||||||
(def chat-view
|
(def chat-view
|
||||||
{:flex 1
|
{:flex 1
|
||||||
:background-color colors/white})
|
:background-color colors/white})
|
||||||
|
|
|
@ -438,16 +438,10 @@
|
||||||
;; components (e.g. chat-toolbar) there can be a brief visual inconsistancy like showing 'add contact'
|
;; components (e.g. chat-toolbar) there can be a brief visual inconsistancy like showing 'add contact'
|
||||||
;; in public chat
|
;; in public chat
|
||||||
(when (= chat-id current-chat-id)
|
(when (= chat-id current-chat-id)
|
||||||
;; this scroll-view is a hack that allows us to use on-blur and on-focus on Android
|
|
||||||
;; more details here: https://github.com/facebook/react-native/issues/11071
|
|
||||||
[react/scroll-view {:scroll-enabled false
|
|
||||||
:style style/scroll-root
|
|
||||||
:content-container-style style/scroll-root
|
|
||||||
:keyboard-should-persist-taps :handled}
|
|
||||||
^{:key current-chat-id}
|
|
||||||
[react/view {:style style/chat-view
|
[react/view {:style style/chat-view
|
||||||
:on-layout (fn [e]
|
:on-layout (fn [e]
|
||||||
(re-frame/dispatch [:set :layout-height (-> e .-nativeEvent .-layout .-height)]))}
|
(re-frame/dispatch [:set :layout-height (-> e .-nativeEvent .-layout .-height)]))}
|
||||||
|
^{:key current-chat-id}
|
||||||
[chat-toolbar current-chat public? modal?]
|
[chat-toolbar current-chat public? modal?]
|
||||||
[connectivity/connectivity-view anim-translate-y]
|
[connectivity/connectivity-view anim-translate-y]
|
||||||
[connectivity/connectivity-animation-wrapper
|
[connectivity/connectivity-animation-wrapper
|
||||||
|
@ -463,7 +457,7 @@
|
||||||
(when show-stickers?
|
(when show-stickers?
|
||||||
[stickers/stickers-view])
|
[stickers/stickers-view])
|
||||||
(when show-message-options?
|
(when show-message-options?
|
||||||
[message-options/view])]])))
|
[message-options/view])])))
|
||||||
|
|
||||||
(defview chat []
|
(defview chat []
|
||||||
[chat-root false])
|
[chat-root false])
|
||||||
|
|
Loading…
Reference in New Issue