File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
packages/uikit-react-native/src/components/ChatFlatList Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -17,13 +17,16 @@ type BidirectionalProps<T> = {
1717} ;
1818
1919function shouldUseScrollViewEnhancer ( ) {
20+ if ( Platform . OS !== 'android' ) return false ;
21+
2022 if ( Platform . constants . reactNativeVersion . major < 1 ) {
2123 if ( Platform . constants . reactNativeVersion . minor < 72 ) {
2224 return true ;
2325 }
2426 }
2527 return false ;
2628}
29+
2730function getFlatList ( ) : FlatListBidirectional {
2831 if ( shouldUseScrollViewEnhancer ( ) ) {
2932 try {
Original file line number Diff line number Diff line change @@ -126,11 +126,11 @@ const Navigations = () => {
126126 } , [ ] ) ;
127127
128128 useEffect ( ( ) => {
129- const { remove } = AppState . addEventListener ( 'change' , async ( ) => {
129+ const subscriber = AppState . addEventListener ( 'change' , async ( ) => {
130130 const count = await sdk . groupChannel . getTotalUnreadMessageCount ( ) ;
131131 Notifee . setBadgeCount ( count ) ;
132132 } ) ;
133- return ( ) => remove ( ) ;
133+ return ( ) => subscriber . remove ( ) ;
134134 } , [ ] ) ;
135135
136136 return (
You can’t perform that action at this time.
0 commit comments