Skip to content

Commit 2af4607

Browse files
committed
[#11704] Android 11 flatlist performance degradation
Signed-off-by: andrey <[email protected]> (cherry picked from commit 32393c9)
1 parent 07a1125 commit 2af4607

File tree

1 file changed

+19
-15
lines changed

1 file changed

+19
-15
lines changed

src/status_im/ui/screens/chat/views.cljs

+19-15
Original file line numberDiff line numberDiff line change
@@ -157,18 +157,19 @@
157157
(debounce/debounce-and-dispatch [:chat.ui/message-visibility-changed e] 5000))
158158

159159
(defn render-fn [{:keys [outgoing type] :as message} idx _ {:keys [group-chat public? current-public-key space-keeper]}]
160-
(if (= type :datemark)
161-
[message-datemark/chat-datemark (:value message)]
162-
(if (= type :gap)
163-
[gap/gap message idx messages-list-ref false]
164-
; message content
165-
[message/chat-message
166-
(assoc message
167-
:incoming-group (and group-chat (not outgoing))
168-
:group-chat group-chat
169-
:public? public?
170-
:current-public-key current-public-key)
171-
space-keeper])))
160+
[react/view {:style (when platform/android? {:scaleY -1})}
161+
(if (= type :datemark)
162+
[message-datemark/chat-datemark (:value message)]
163+
(if (= type :gap)
164+
[gap/gap message idx messages-list-ref false]
165+
; message content
166+
[message/chat-message
167+
(assoc message
168+
:incoming-group (and group-chat (not outgoing))
169+
:group-chat group-chat
170+
:public? public?
171+
:current-public-key current-public-key)
172+
space-keeper]))])
172173

173174
(defn messages-view
174175
[{:keys [chat bottom-space pan-responder space-keeper]}]
@@ -183,13 +184,16 @@
183184
{:key-fn #(or (:message-id %) (:value %))
184185
:ref #(reset! messages-list-ref %)
185186
:header (when (= chat-type constants/private-group-chat-type)
186-
[chat.group/group-chat-footer chat-id invitation-admin])
187-
:footer [:<>
187+
[react/view {:style (when platform/android? {:scaleY -1})}
188+
[chat.group/group-chat-footer chat-id invitation-admin]])
189+
:footer [react/view {:style (when platform/android? {:scaleY -1})}
188190
[chat-intro-header-container chat no-messages?]
189191
(when (= chat-type constants/one-to-one-chat-type)
190192
[invite.chat/reward-messages])]
191193
:data messages
192-
:inverted true
194+
;;TODO https://github.com/facebook/react-native/issues/30034
195+
:inverted (when platform/ios? true)
196+
:style (when platform/android? {:scaleY -1})
193197
:render-data {:group-chat group-chat
194198
:public? public?
195199
:current-public-key current-public-key

0 commit comments

Comments
 (0)