Fix error view jumps

This commit is contained in:
Vitaliy Vlasov 2018-08-28 18:47:35 +03:00
parent 3e43d85215
commit fc12e22535
No known key found for this signature in database
GPG Key ID: A7D57C347F2B2964
2 changed files with 34 additions and 31 deletions

View File

@ -7,13 +7,17 @@
(cond->
{:opacity opacity
:background-color colors/gray-notifications
:height 35}
:height 35
:position :absolute}
platform/desktop?
(assoc
:left 0
:right 0)
(not platform/desktop?)
(assoc
:ios {:z-index 0}
:width window-width
:top (+ (+ 56 top) (if pending? 35 0))
:position :absolute)))
:top (+ (+ 56 top) (if pending? 35 0)))))
(def text
{:text-align :center

View File

@ -27,7 +27,6 @@
:as current-chat}]
(views/letsubs [chat-name [:get-current-chat-name]
{:keys [pending? whisper-identity photo-path]} [:get-current-chat-contact]]
[react/view
[react/view {:style styles/toolbar-chat-view}
[react/view {:style {:flex-direction :row
:flex 1}}
@ -59,8 +58,7 @@
(i18n/label :t/clear-history)]
[react/text {:style (styles/profile-actions-text colors/black)
:on-press #(re-frame/dispatch [:chat.ui/delete-chat-pressed chat-id])}
(i18n/label :t/delete-chat)]]]
[connectivity/error-view {:top 2}]]))
(i18n/label :t/delete-chat)]]]))
(views/defview message-author-name [{:keys [outgoing from] :as message}]
(views/letsubs [current-account [:get-current-account]
@ -155,6 +153,7 @@
(reset! chat-id* chat-id)
(js/setTimeout #(when @scroll-ref (.scrollToEnd @scroll-ref)) 400))]
[react/view {:style styles/messages-view}
[connectivity/error-view]
[react/scroll-view {:scrollEventThrottle 16
:headerHeight styles/messages-list-vertical-padding
:footerWidth styles/messages-list-vertical-padding