File tree Expand file tree Collapse file tree 1 file changed +13
-7
lines changed
package/src/components/MessageList Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -956,10 +956,19 @@ const MessageListWithContext = <
956956 } ) ;
957957 }
958958
959- const renderListEmptyComponent = ( ) => (
960- < View style = { [ styles . flex , styles . invert ] } testID = 'empty-state' >
961- < EmptyStateIndicator listType = 'message' />
962- </ View >
959+ const shouldApplyAndroidWorkaround =
960+ inverted && Platform . OS === 'android' && Platform . Version >= 33 ;
961+
962+ const renderListEmptyComponent = useCallback (
963+ ( ) => (
964+ < View
965+ style = { [ styles . flex , shouldApplyAndroidWorkaround ? styles . invertAndroid : styles . invert ] }
966+ testID = 'empty-state'
967+ >
968+ < EmptyStateIndicator listType = 'message' />
969+ </ View >
970+ ) ,
971+ [ EmptyStateIndicator , shouldApplyAndroidWorkaround ] ,
963972 ) ;
964973
965974 if ( ! FlatList ) return null ;
@@ -979,9 +988,6 @@ const MessageListWithContext = <
979988 return null ;
980989 } ;
981990
982- const shouldApplyAndroidWorkaround =
983- inverted && Platform . OS === 'android' && Platform . Version >= 33 ;
984-
985991 return (
986992 < View
987993 style = { [ styles . container , { backgroundColor : white_snow } , container ] }
You can’t perform that action at this time.
0 commit comments