Test commit for inverted feature
This commit is contained in:
parent
33da59f859
commit
d9e7d7c887
|
@ -156,12 +156,13 @@
|
||||||
scroll-height (atom nil)
|
scroll-height (atom nil)
|
||||||
_ (when (or (not @chat-id*) (not= @chat-id* chat-id))
|
_ (when (or (not @chat-id*) (not= @chat-id* chat-id))
|
||||||
(reset! chat-id* chat-id)
|
(reset! chat-id* chat-id)
|
||||||
(js/setTimeout #(when @scroll-ref (.scrollToEnd @scroll-ref)) 400))]
|
#_(js/setTimeout #(when @scroll-ref (.scrollToEnd @scroll-ref)) 400))]
|
||||||
[react/view {:style styles/messages-view}
|
[react/view {:style styles/messages-view}
|
||||||
[react/scroll-view {:scrollEventThrottle 16
|
[react/scroll-view {:scrollEventThrottle 16
|
||||||
:headerHeight styles/messages-list-vertical-padding
|
:headerHeight styles/messages-list-vertical-padding
|
||||||
:footerWidth styles/messages-list-vertical-padding
|
:footerWidth styles/messages-list-vertical-padding
|
||||||
:enableArrayScrollingOptimization true
|
:enableArrayScrollingOptimization true
|
||||||
|
:inverted true
|
||||||
:on-scroll (fn [e]
|
:on-scroll (fn [e]
|
||||||
(let [ne (.-nativeEvent e)
|
(let [ne (.-nativeEvent e)
|
||||||
y (.-y (.-contentOffset ne))]
|
y (.-y (.-contentOffset ne))]
|
||||||
|
@ -173,7 +174,7 @@
|
||||||
:ref #(reset! scroll-ref %)}
|
:ref #(reset! scroll-ref %)}
|
||||||
[react/view
|
[react/view
|
||||||
(doall
|
(doall
|
||||||
(for [[index {:keys [from content message-id type value] :as message-obj}] (map-indexed vector (reverse messages))]
|
(for [[index {:keys [from content message-id type value] :as message-obj}] (map-indexed vector messages)]
|
||||||
^{:key message-obj}
|
^{:key message-obj}
|
||||||
[message content (= from current-public-key)
|
[message content (= from current-public-key)
|
||||||
(assoc message-obj :group-chat group-chat
|
(assoc message-obj :group-chat group-chat
|
||||||
|
|
Loading…
Reference in New Issue