Changeset View
Changeset View
Standalone View
Standalone View
native/chat/chat.react.js
Show First 20 Lines • Show All 63 Lines • ▼ Show 20 Lines | import { | ||||
MessageListRouteName, | MessageListRouteName, | ||||
ChatThreadListRouteName, | ChatThreadListRouteName, | ||||
HomeChatThreadListRouteName, | HomeChatThreadListRouteName, | ||||
BackgroundChatThreadListRouteName, | BackgroundChatThreadListRouteName, | ||||
type ScreenParamList, | type ScreenParamList, | ||||
type ChatParamList, | type ChatParamList, | ||||
type ChatTopTabsParamList, | type ChatTopTabsParamList, | ||||
MessageSearchRouteName, | MessageSearchRouteName, | ||||
ChangeRolesScreenRouteName, | |||||
} from '../navigation/route-names.js'; | } from '../navigation/route-names.js'; | ||||
import ChangeRolesScreen from '../roles/change-roles-screen.react.js'; | |||||
import MessageSearch from '../search/message-search.react.js'; | import MessageSearch from '../search/message-search.react.js'; | ||||
import SearchHeader from '../search/search-header.react.js'; | import SearchHeader from '../search/search-header.react.js'; | ||||
import SearchMessagesButton from '../search/search-messages-button.react.js'; | import SearchMessagesButton from '../search/search-messages-button.react.js'; | ||||
import { useColors, useStyles } from '../themes/colors.js'; | import { useColors, useStyles } from '../themes/colors.js'; | ||||
const unboundStyles = { | const unboundStyles = { | ||||
keyboardAvoidingView: { | keyboardAvoidingView: { | ||||
flex: 1, | flex: 1, | ||||
▲ Show 20 Lines • Show All 207 Lines • ▼ Show 20 Lines | const messageSearchOptions = { | ||||
headerTitleContainerStyle: { | headerTitleContainerStyle: { | ||||
width: '100%', | width: '100%', | ||||
}, | }, | ||||
}; | }; | ||||
const messageResultsScreenOptions = { | const messageResultsScreenOptions = { | ||||
headerTitle: 'Pinned Messages', | headerTitle: 'Pinned Messages', | ||||
headerBackTitleVisible: false, | headerBackTitleVisible: false, | ||||
}; | }; | ||||
const changeRolesScreenOptions = { | |||||
headerTitle: 'Change Role', | |||||
presentation: 'modal', | |||||
}; | |||||
export type ChatNavigationProp< | export type ChatNavigationProp< | ||||
RouteName: $Keys<ChatParamList> = $Keys<ChatParamList>, | RouteName: $Keys<ChatParamList> = $Keys<ChatParamList>, | ||||
> = { | > = { | ||||
...StackNavigationProp<ScreenParamList, RouteName>, | ...StackNavigationProp<ScreenParamList, RouteName>, | ||||
...ChatRouterNavigationHelpers, | ...ChatRouterNavigationHelpers, | ||||
}; | }; | ||||
▲ Show 20 Lines • Show All 102 Lines • ▼ Show 20 Lines | <View style={styles.view}> | ||||
component={MessageResultsScreen} | component={MessageResultsScreen} | ||||
options={messageResultsScreenOptions} | options={messageResultsScreenOptions} | ||||
/> | /> | ||||
<Chat.Screen | <Chat.Screen | ||||
name={MessageSearchRouteName} | name={MessageSearchRouteName} | ||||
component={MessageSearch} | component={MessageSearch} | ||||
options={messageSearchOptions} | options={messageSearchOptions} | ||||
/> | /> | ||||
<Chat.Screen | |||||
name={ChangeRolesScreenRouteName} | |||||
component={ChangeRolesScreen} | |||||
options={changeRolesScreenOptions} | |||||
/> | |||||
</Chat.Navigator> | </Chat.Navigator> | ||||
<MessageStorePruner /> | <MessageStorePruner /> | ||||
<ThreadScreenPruner /> | <ThreadScreenPruner /> | ||||
{draftUpdater} | {draftUpdater} | ||||
</KeyboardAvoidingView> | </KeyboardAvoidingView> | ||||
</View> | </View> | ||||
); | ); | ||||
} | } |