@@ -6,7 +6,6 @@ import { createStackNavigator } from '@react-navigation/stack';
66import { SafeAreaProvider , useSafeAreaInsets } from 'react-native-safe-area-context' ;
77import {
88 Chat ,
9- MessageType ,
109 OverlayProvider ,
1110 SqliteClient ,
1211 ThemeProvider ,
@@ -36,7 +35,7 @@ import { SharedGroupsScreen } from './src/screens/SharedGroupsScreen';
3635import { ThreadScreen } from './src/screens/ThreadScreen' ;
3736import { UserSelectorScreen } from './src/screens/UserSelectorScreen' ;
3837
39- import type { StreamChat } from 'stream-chat' ;
38+ import type { LocalMessage , StreamChat } from 'stream-chat' ;
4039
4140if ( __DEV__ ) {
4241 DevSettings . addMenuItem ( 'Reset local DB (offline storage)' , ( ) => {
@@ -45,10 +44,7 @@ if (__DEV__) {
4544 } ) ;
4645}
4746
48- import type {
49- StackNavigatorParamList ,
50- UserSelectorParamList ,
51- } from './src/types' ;
47+ import type { StackNavigatorParamList , UserSelectorParamList } from './src/types' ;
5248import { GestureHandlerRootView } from 'react-native-gesture-handler' ;
5349import { navigateToChannel , RootNavigationRef } from './src/utils/RootNavigation' ;
5450import FastImage from 'react-native-fast-image' ;
@@ -106,18 +102,16 @@ const App = () => {
106102 }
107103 }
108104 } ) ;
109- messaging
110- . getInitialNotification ( )
111- . then ( ( remoteMessage ) => {
112- if ( remoteMessage ) {
113- // Notification caused app to open from quit state on iOS
114- const channelId = remoteMessage . data ?. channel_id as string ;
115- if ( channelId ) {
116- // this will make the app to start with the channel screen with this channel id
117- initialChannelIdGlobalRef . current = channelId ;
118- }
105+ messaging . getInitialNotification ( ) . then ( ( remoteMessage ) => {
106+ if ( remoteMessage ) {
107+ // Notification caused app to open from quit state on iOS
108+ const channelId = remoteMessage . data ?. channel_id as string ;
109+ if ( channelId ) {
110+ // this will make the app to start with the channel screen with this channel id
111+ initialChannelIdGlobalRef . current = channelId ;
119112 }
120- } ) ;
113+ }
114+ } ) ;
121115 return ( ) => {
122116 unsubscribeOnNotificationOpen ( ) ;
123117 unsubscribeForegroundEvent ( ) ;
@@ -170,7 +164,7 @@ const DrawerNavigator: React.FC = () => (
170164 </ Drawer . Navigator >
171165) ;
172166
173- const isMessageAIGenerated = ( message : MessageType ) => ! ! message . ai_generated ;
167+ const isMessageAIGenerated = ( message : LocalMessage ) => ! ! message . ai_generated ;
174168
175169const DrawerNavigatorWrapper : React . FC < {
176170 chatClient : StreamChat ;
0 commit comments