Keep message list rendered while switching between tabs

This commit is contained in:
Roman Volosovskyi 2019-02-25 11:44:06 +02:00
parent ff3a54e9e3
commit a3316bc8fa
No known key found for this signature in database
GPG Key ID: 0238A4B5ECEE70DE
1 changed files with 3 additions and 6 deletions

View File

@ -198,8 +198,7 @@
my-public-key [:account/public-key]
show-bottom-info? [:chats/current-chat-ui-prop :show-bottom-info?]
show-message-options? [:chats/current-chat-ui-prop :show-message-options?]
show-stickers? [:chats/current-chat-ui-prop :show-stickers?]
current-view [:get :view-id]]
show-stickers? [:chats/current-chat-ui-prop :show-stickers?]]
;; 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
@ -210,10 +209,8 @@
:on-layout (fn [e]
(re-frame/dispatch [:set :layout-height (-> e .-nativeEvent .-layout .-height)]))}
[chat-toolbar public? modal?]
(if (or (= :chat current-view) modal?)
[messages-view-animation
[messages-view-wrapper modal?]]
[react/view style/message-view-preview])
[messages-view-animation
[messages-view-wrapper modal?]]
(when (show-input-container? my-public-key current-chat)
[input/container])
(when show-stickers?