@@ -6,7 +6,6 @@ import { createStackNavigator } from '@react-navigation/stack';
6
6
import { SafeAreaProvider , useSafeAreaInsets } from 'react-native-safe-area-context' ;
7
7
import {
8
8
Chat ,
9
- MessageType ,
10
9
OverlayProvider ,
11
10
SqliteClient ,
12
11
ThemeProvider ,
@@ -36,7 +35,7 @@ import { SharedGroupsScreen } from './src/screens/SharedGroupsScreen';
36
35
import { ThreadScreen } from './src/screens/ThreadScreen' ;
37
36
import { UserSelectorScreen } from './src/screens/UserSelectorScreen' ;
38
37
39
- import type { StreamChat } from 'stream-chat' ;
38
+ import type { LocalMessage , StreamChat } from 'stream-chat' ;
40
39
41
40
if ( __DEV__ ) {
42
41
DevSettings . addMenuItem ( 'Reset local DB (offline storage)' , ( ) => {
@@ -45,10 +44,7 @@ if (__DEV__) {
45
44
} ) ;
46
45
}
47
46
48
- import type {
49
- StackNavigatorParamList ,
50
- UserSelectorParamList ,
51
- } from './src/types' ;
47
+ import type { StackNavigatorParamList , UserSelectorParamList } from './src/types' ;
52
48
import { GestureHandlerRootView } from 'react-native-gesture-handler' ;
53
49
import { navigateToChannel , RootNavigationRef } from './src/utils/RootNavigation' ;
54
50
import FastImage from 'react-native-fast-image' ;
@@ -106,18 +102,16 @@ const App = () => {
106
102
}
107
103
}
108
104
} ) ;
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 ;
119
112
}
120
- } ) ;
113
+ }
114
+ } ) ;
121
115
return ( ) => {
122
116
unsubscribeOnNotificationOpen ( ) ;
123
117
unsubscribeForegroundEvent ( ) ;
@@ -170,7 +164,7 @@ const DrawerNavigator: React.FC = () => (
170
164
</ Drawer . Navigator >
171
165
) ;
172
166
173
- const isMessageAIGenerated = ( message : MessageType ) => ! ! message . ai_generated ;
167
+ const isMessageAIGenerated = ( message : LocalMessage ) => ! ! message . ai_generated ;
174
168
175
169
const DrawerNavigatorWrapper : React . FC < {
176
170
chatClient : StreamChat ;
0 commit comments