@planningcenter/chat-react-native 3.25.0 → 3.26.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/components/group_conversation_list.d.ts +4 -0
- package/build/components/group_conversation_list.d.ts.map +1 -1
- package/build/components/group_conversation_list.js +10 -4
- package/build/components/group_conversation_list.js.map +1 -1
- package/build/navigation/index.d.ts +26 -1
- package/build/navigation/index.d.ts.map +1 -1
- package/build/navigation/index.js +9 -0
- package/build/navigation/index.js.map +1 -1
- package/build/screens/message_report_screen.d.ts +1 -1
- package/build/screens/message_report_screen.d.ts.map +1 -1
- package/build/screens/message_report_screen.js +10 -5
- package/build/screens/message_report_screen.js.map +1 -1
- package/package.json +2 -2
- package/src/components/group_conversation_list.tsx +16 -3
- package/src/navigation/index.tsx +15 -0
- package/src/screens/message_report_screen.tsx +15 -5
|
@@ -5,8 +5,12 @@ interface GroupConversationsProps extends Partial<ConversationRequestArgs> {
|
|
|
5
5
|
limit?: number;
|
|
6
6
|
onConversationPress: (conversation: any) => void;
|
|
7
7
|
style?: ViewStyle;
|
|
8
|
+
onConversationsLoad?: ({ hasConversations }: {
|
|
9
|
+
hasConversations: boolean;
|
|
10
|
+
}) => void;
|
|
8
11
|
ListHeaderComponent?: React.ComponentType<any> | React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
9
12
|
ListOverflowFooterComponent?: React.ComponentType<any> | React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
13
|
+
ListEmptyFooterComponent?: React.ComponentType<any> | React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
10
14
|
}
|
|
11
15
|
/**
|
|
12
16
|
* GroupConversations is a component that displays a list of conversations
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"group_conversation_list.d.ts","sourceRoot":"","sources":["../../src/components/group_conversation_list.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"group_conversation_list.d.ts","sourceRoot":"","sources":["../../src/components/group_conversation_list.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAA;AACxC,OAAO,EAAoB,SAAS,EAAE,MAAM,cAAc,CAAA;AAE1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAA;AAQvE,UAAU,uBAAwB,SAAQ,OAAO,CAAC,uBAAuB,CAAC;IACxE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,mBAAmB,EAAE,CAAC,YAAY,EAAE,GAAG,KAAK,IAAI,CAAA;IAChD,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,mBAAmB,CAAC,EAAE,CAAC,EAAE,gBAAgB,EAAE,EAAE;QAAE,gBAAgB,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,CAAA;IACnF,mBAAmB,CAAC,EAChB,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,GACxB,KAAK,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC,CAAA;IACtE,2BAA2B,CAAC,EACxB,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,GACxB,KAAK,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC,CAAA;IACtE,wBAAwB,CAAC,EACrB,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,GACxB,KAAK,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC,CAAA;CACvE;AAED;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,qCAAsC,uBAAuB,sBAM3F,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useEffect } from 'react';
|
|
2
2
|
import { StyleSheet, View } from 'react-native';
|
|
3
3
|
import { ConversationPreview } from './conversations/conversation_preview';
|
|
4
4
|
import { useTheme } from '../hooks';
|
|
@@ -15,14 +15,20 @@ export const GroupConversations = ({ chat_group_graph_id, ...rest }) => {
|
|
|
15
15
|
<GroupConversationList {...rest}/>
|
|
16
16
|
</ConversationsContextProvider>);
|
|
17
17
|
};
|
|
18
|
-
const GroupConversationList = ({ limit, onConversationPress, style, ListHeaderComponent, ListOverflowFooterComponent, }) => {
|
|
18
|
+
const GroupConversationList = ({ limit, onConversationPress, style, onConversationsLoad, ListHeaderComponent, ListOverflowFooterComponent, ListEmptyFooterComponent, }) => {
|
|
19
19
|
const styles = useStyles();
|
|
20
|
-
const { conversations = [] } = useConversationsContext();
|
|
20
|
+
const { conversations = [], isFetched } = useConversationsContext();
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
if (isFetched) {
|
|
23
|
+
onConversationsLoad?.({ hasConversations: conversations.length > 0 });
|
|
24
|
+
}
|
|
25
|
+
}, [conversations.length, isFetched, onConversationsLoad]);
|
|
21
26
|
return (<View style={style}>
|
|
22
27
|
<>{ListHeaderComponent}</>
|
|
23
|
-
{conversations.length === 0 && (<View style={styles.listEmpty}>
|
|
28
|
+
{isFetched && conversations.length === 0 && (<View style={styles.listEmpty}>
|
|
24
29
|
<Icon size={24} name="general.textMessage" style={styles.listEmptyIcon}/>
|
|
25
30
|
<Text variant="secondary">No conversations found</Text>
|
|
31
|
+
<>{ListEmptyFooterComponent}</>
|
|
26
32
|
</View>)}
|
|
27
33
|
{conversations.slice(0, limit).map(conversation => (<ConversationPreview style={styles.conversation} key={conversation.id} showBadges={false} conversation={conversation} onPress={() => onConversationPress(conversation)}/>))}
|
|
28
34
|
{conversations.length > (limit || 0) && <>{ListOverflowFooterComponent}</>}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"group_conversation_list.js","sourceRoot":"","sources":["../../src/components/group_conversation_list.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"group_convers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C,MAAM,CAAC;QACvB,UAAU,EAAE,EAAE;QACd,YAAY,EAAE;YACZ,iBAAiB,EAAE,CAAC;SACrB;QACD,QAAQ,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,mBAAmB,EAAE;QAC/C,SAAS,EAAE;YACT,cAAc,EAAE,QAAQ;YACxB,UAAU,EAAE,QAAQ;YACpB,eAAe,EAAE,EAAE;YACnB,GAAG,EAAE,CAAC;SACP;QACD,aAAa,EAAE;YACb,KAAK,EAAE,MAAM,CAAC,mBAAmB;SAClC;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import React, { useEffect } from 'react'\nimport { StyleSheet, View, ViewStyle } from 'react-native'\nimport { ConversationPreview } from './conversations/conversation_preview'\nimport { ConversationRequestArgs } from '../utils/request/conversation'\nimport { useTheme } from '../hooks'\nimport { Icon, Text } from './display'\nimport {\n ConversationsContextProvider,\n useConversationsContext,\n} from '../contexts/conversations_context'\n\ninterface GroupConversationsProps extends Partial<ConversationRequestArgs> {\n limit?: number\n onConversationPress: (conversation: any) => void\n style?: ViewStyle\n onConversationsLoad?: ({ hasConversations }: { hasConversations: boolean }) => void\n ListHeaderComponent?:\n | React.ComponentType<any>\n | React.ReactElement<any, string | React.JSXElementConstructor<any>>\n ListOverflowFooterComponent?:\n | React.ComponentType<any>\n | React.ReactElement<any, string | React.JSXElementConstructor<any>>\n ListEmptyFooterComponent?:\n | React.ComponentType<any>\n | React.ReactElement<any, string | React.JSXElementConstructor<any>>\n}\n\n/**\n * GroupConversations is a component that displays a list of conversations\n * for a specific group.\n *\n * Originally designed for use in CCA.\n */\nexport const GroupConversations = ({ chat_group_graph_id, ...rest }: GroupConversationsProps) => {\n return (\n <ConversationsContextProvider args={{ chat_group_graph_id, group_source_app_name: undefined }}>\n <GroupConversationList {...rest} />\n </ConversationsContextProvider>\n )\n}\n\nconst GroupConversationList = ({\n limit,\n onConversationPress,\n style,\n onConversationsLoad,\n ListHeaderComponent,\n ListOverflowFooterComponent,\n ListEmptyFooterComponent,\n}: GroupConversationsProps) => {\n const styles = useStyles()\n const { conversations = [], isFetched } = useConversationsContext()\n\n useEffect(() => {\n if (isFetched) {\n onConversationsLoad?.({ hasConversations: conversations.length > 0 })\n }\n }, [conversations.length, isFetched, onConversationsLoad])\n\n return (\n <View style={style}>\n <>{ListHeaderComponent}</>\n {isFetched && conversations.length === 0 && (\n <View style={styles.listEmpty}>\n <Icon size={24} name=\"general.textMessage\" style={styles.listEmptyIcon} />\n <Text variant=\"secondary\">No conversations found</Text>\n <>{ListEmptyFooterComponent}</>\n </View>\n )}\n {conversations.slice(0, limit).map(conversation => (\n <ConversationPreview\n style={styles.conversation}\n key={conversation.id}\n showBadges={false}\n conversation={conversation}\n onPress={() => onConversationPress(conversation)}\n />\n ))}\n {conversations.length > (limit || 0) && <>{ListOverflowFooterComponent}</>}\n </View>\n )\n}\n\nconst useStyles = () => {\n const { colors } = useTheme()\n return StyleSheet.create({\n constainer: {},\n conversation: {\n borderBottomWidth: 0,\n },\n listItem: { color: colors.fillColorNeutral020 },\n listEmpty: {\n justifyContent: 'center',\n alignItems: 'center',\n paddingVertical: 16,\n gap: 8,\n },\n listEmptyIcon: {\n color: colors.fillColorNeutral020,\n },\n })\n}\n"]}
|
|
@@ -302,6 +302,31 @@ export declare const ChatStack: import("@react-navigation/native").TypedNavigato
|
|
|
302
302
|
readonly presentation: "modal";
|
|
303
303
|
};
|
|
304
304
|
};
|
|
305
|
+
readonly GroupConversationNew: {
|
|
306
|
+
readonly screen: ({ route }: {
|
|
307
|
+
route: {
|
|
308
|
+
params: {
|
|
309
|
+
group_id?: number;
|
|
310
|
+
team_ids?: number[];
|
|
311
|
+
team_filter_type?: import("../screens/conversation_filter_recipients/types").TeamFilterTypes;
|
|
312
|
+
plan_id?: number;
|
|
313
|
+
source_app_name: import("../types/resources/app_name").AppName;
|
|
314
|
+
chat_group_graph_id?: import("..").GraphId;
|
|
315
|
+
group_source_app_name?: import("../types/resources/app_name").AppName;
|
|
316
|
+
};
|
|
317
|
+
};
|
|
318
|
+
}) => React.JSX.Element;
|
|
319
|
+
readonly if: () => boolean;
|
|
320
|
+
readonly options: ({ navigation }: {
|
|
321
|
+
route: import("@react-navigation/native").RouteProp<import("@react-navigation/native").ParamListBase, string>;
|
|
322
|
+
navigation: import("@react-navigation/native-stack").NativeStackNavigationProp<import("@react-navigation/native").ParamListBase, string, undefined>;
|
|
323
|
+
theme: ReactNavigation.Theme;
|
|
324
|
+
}) => {
|
|
325
|
+
title: string;
|
|
326
|
+
headerLeft: () => null;
|
|
327
|
+
headerRight: (props: NativeStackHeaderRightProps) => React.JSX.Element;
|
|
328
|
+
};
|
|
329
|
+
};
|
|
305
330
|
readonly SendGiphy: {
|
|
306
331
|
readonly screen: typeof SendGiphyScreen;
|
|
307
332
|
readonly options: import("@react-navigation/native-stack").NativeStackNavigationOptions;
|
|
@@ -312,7 +337,7 @@ export declare const ChatStack: import("@react-navigation/native").TypedNavigato
|
|
|
312
337
|
};
|
|
313
338
|
readonly MessageReport: {
|
|
314
339
|
readonly screen: typeof MessageReportScreen;
|
|
315
|
-
readonly options: ({ navigation, }: import("@react-navigation/native-stack").NativeStackScreenProps<any>) => import("@react-navigation/native-stack").NativeStackNavigationOptions;
|
|
340
|
+
readonly options: ({ navigation, route, }: import("@react-navigation/native-stack").NativeStackScreenProps<any>) => import("@react-navigation/native-stack").NativeStackNavigationOptions;
|
|
316
341
|
};
|
|
317
342
|
readonly AttachmentActions: {
|
|
318
343
|
readonly screen: typeof AttachmentActionsScreen;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/navigation/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAC1D,OAAO,EAEL,2BAA2B,EAC5B,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAA;AAChE,OAAO,KAAK,MAAM,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upConversationNew: {
|
|
188
|
+
screen: ConversationNewScreen,
|
|
189
|
+
if: useQualifiedByAge,
|
|
190
|
+
options: ({ navigation }) => ({
|
|
191
|
+
title: 'New conversation',
|
|
192
|
+
headerLeft: () => null,
|
|
193
|
+
headerRight: props => (<HeaderTextButton {...props} onPress={() => navigation.getParent()?.goBack()} title="Cancel"/>),
|
|
194
|
+
}),
|
|
195
|
+
},
|
|
187
196
|
SendGiphy: {
|
|
188
197
|
screen: SendGiphyScreen,
|
|
189
198
|
options: SendGiphyScreenOptions,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/navigation/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAE7D,OAAO,EACL,0BAA0B,GAE3B,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAA;AAChE,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACpC,OAAO,EACL,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,qDAAqD,CAAA;AAC5D,OAAO,EACL,uBAAuB,EACvB,8BAA8B,GAC/B,MAAM,yDAAyD,CAAA;AAChE,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAA;AACtF,OAAO,EACL,yBAAyB,EACzB,gCAAgC,GACjC,MAAM,sDAAsD,CAAA;AAC7D,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAA;AAClF,OAAO,EACL,0CAA0C,EAC1C,kCAAkC,GACnC,MAAM,iFAAiF,CAAA;AAExF,OAAO,EACL,yBAAyB,EACzB,gCAAgC,GACjC,MAAM,wCAAwC,CAAA;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,qDAAqD,CAAA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E,KAAK,CAAC,EAAE,CAAC,CACpB,CAAC,gBAAgB,CAAC,IAAI,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,OAAO,EAAG,CAC1E;aACF,CAAC;SACH;QACD,QAAQ,EAAE;YACR,MAAM,EAAE,QAAQ;YAChB,OAAO,EAAE;gBACP,KAAK,EAAE,KAAK;aACb;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,GAAG;aACV;SACF;KACF;CACF,CAAC,CAAA","sourcesContent":["import { HeaderBackButton } from '@react-navigation/elements'\nimport { StaticParamList } from '@react-navigation/native'\nimport {\n createNativeStackNavigator,\n NativeStackHeaderRightProps,\n} from '@react-navigation/native-stack'\nimport { CardStyleInterpolators } from '@react-navigation/stack'\nimport React from 'react'\nimport { Platform } from 'react-native'\nimport { Icon } from '../components'\nimport {\n HeaderDoneButton,\n HeaderTextButton,\n} from '../components/display/platform_modal_header_buttons'\nimport {\n AttachmentActionsScreen,\n AttachmentActionsScreenOptions,\n} from '../screens/attachment_actions/attachment_actions_screen'\nimport { BugReportScreen, BugReportScreenOptions } from '../screens/bug_report_screen'\nimport {\n MessageReadReceiptsScreen,\n MessageReadReceiptsScreenOptions,\n} from '../screens/conversation/message_read_receipts_screen'\nimport { ConversationDetailsScreen } from '../screens/conversation_details_screen'\nimport {\n ConversationFilterReceipientsScreenOptions,\n ConversationFilterRecipientsScreen,\n} from '../screens/conversation_filter_recipients/conversation_filter_recipients_screen'\nimport { ConversationFiltersParams } from '../screens/conversation_filters/screen_props'\nimport {\n ConversationFiltersScreen,\n ConversationFiltersScreenOptions,\n} from '../screens/conversation_filters_screen'\nimport { ConversationNewScreen } from '../screens/conversation_new/conversation_new_screen'\nimport {\n ConversationRouteProps,\n ConversationScreen,\n ConversationScreenTitle,\n} from '../screens/conversation_screen'\nimport { ConversationSelectGroupRecipientsScreen } from '../screens/conversation_select_recipients/conversation_select_group_recipients_screen'\nimport { ConversationSelectTeamsILeadRecipientsScreen } from '../screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen'\nimport { ConversationNewEntryScreen } from '../screens/conversation_select_recipients/conversation_new_entry_screen'\nimport { ConversationSelectRecipientsParams } from '../screens/conversation_select_recipients/types/screen_props'\nimport {\n ConversationSelectTypeScreen,\n ConversationSelectTypeScreenOptions,\n} from '../screens/conversation_select_type_screen'\nimport { ConversationsScreen } from '../screens/conversations/conversations_screen'\nimport { GetHelpScreen } from '../screens/get_help_screen'\nimport {\n MessageActionsScreen,\n MessageActionsScreenOptions,\n} from '../screens/message_actions_screen'\nimport { MessageReportScreen, MessageReportScreenOptions } from '../screens/message_report_screen'\nimport { NotFound } from '../screens/not_found'\nimport { NotificationSettingsScreen } from '../screens/notification_settings_screen'\nimport { PreferredAppSelectionScreen } from '../screens/preferred_app_selection_screen'\nimport { GroupNotificationSettingsScreen } from '../screens/group_notification_settings_screen'\nimport {\n GroupNotificationLevelSelectScreen,\n GroupNotificationLevelSelectScreenOptions,\n} from '../screens/group_notification_level_select_screen'\nimport {\n ConversationNotificationLevelSelectScreen,\n ConversationNotificationLevelSelectScreenOptions,\n} from '../screens/conversation_notification_level_select_screen'\nimport { ReactionsScreen, ReactionsScreenOptions } from '../screens/reactions_screen'\nimport { ScreenLayoutWithChatAccessGate } from './screenLayout'\nimport { SendGiphyScreen, SendGiphyScreenOptions } from '../screens/send_giphy_screen'\nimport { TeamConversationScreen } from '../screens/team_conversation_screen'\nimport { useQualifiedByAge } from '../hooks'\n\nconst HEADER_BACK_BUTTON_LAYOUT_RESET_STYLES = {\n marginLeft: Platform.select({ ios: -8, default: -3 }),\n marginRight: Platform.select({ ios: 0, default: 30 }),\n}\n\nexport const NewConversationStack = createNativeStackNavigator({\n initialRouteName: 'ConversationNewEntry',\n screenOptions: {\n headerBackButtonDisplayMode: 'minimal',\n },\n screenLayout: ScreenLayoutWithChatAccessGate,\n screens: {\n ConversationNewEntry: {\n screen: ConversationNewEntryScreen,\n options: ({ navigation }) => ({\n title: 'New conversation',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton {...props} onPress={navigation.goBack} title=\"Cancel\" />\n ),\n headerBackVisible: false,\n }),\n },\n ConversationSelectGroupRecipients: {\n screen: ConversationSelectGroupRecipientsScreen,\n options: ({ navigation, route }) => ({\n title: 'New conversation',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton\n {...props}\n onPress={() => navigation.popTo('Conversations', route.params)}\n title=\"Cancel\"\n />\n ),\n }),\n },\n ConversationSelectTeamsILeadRecipients: {\n screen: ConversationSelectTeamsILeadRecipientsScreen,\n options: ({ navigation, route }) => ({\n title: 'New conversation',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton\n {...props}\n onPress={() => navigation.popTo('Conversations', route.params)}\n title=\"Cancel\"\n />\n ),\n }),\n },\n ConversationFilterRecipients: {\n screen: ConversationFilterRecipientsScreen,\n options: ConversationFilterReceipientsScreenOptions,\n },\n ConversationNew: {\n screen: ConversationNewScreen,\n options: ({ navigation, route }) => ({\n title: 'New conversation',\n headerLeft: () => null,\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton\n {...props}\n onPress={() => {\n const { chat_group_graph_id, group_source_app_name } =\n route.params as ConversationSelectRecipientsParams\n navigation.popTo('Conversations', { chat_group_graph_id, group_source_app_name })\n }}\n title=\"Cancel\"\n />\n ),\n }),\n },\n },\n})\n\nexport const ChatStack = createNativeStackNavigator({\n screenOptions: {\n headerBackButtonDisplayMode: 'minimal',\n },\n screenLayout: ScreenLayoutWithChatAccessGate,\n screens: {\n Conversations: {\n screen: ConversationsScreen,\n options: ({ route, navigation }) => ({\n headerTitle: (route.params as { title?: string })?.title ?? 'Chat',\n headerBackVisible: false,\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderBackButton\n backImage={() => <Icon name=\"general.x\" size={18} color={props.tintColor} />}\n onPress={navigation.goBack}\n {...props}\n />\n ),\n }),\n },\n ConversationFilters: {\n screen: ConversationFiltersScreen,\n options: ConversationFiltersScreenOptions,\n },\n Conversation: {\n screen: ConversationScreen,\n options: ({ route, navigation }) => ({\n headerTitle: (props: NativeStackHeaderRightProps) => {\n const { conversation_id, title, badge, deleted, muted } =\n route.params as ConversationRouteProps\n\n return (\n <ConversationScreenTitle\n conversation_id={conversation_id}\n badge={badge}\n deleted={deleted}\n muted={muted}\n {...props}\n >\n {title ?? 'Conversation'}\n </ConversationScreenTitle>\n )\n },\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderBackButton\n backImage={() => <Icon name=\"general.x\" size={18} color={props.tintColor} />}\n onPress={() => navigation.getParent()?.goBack()}\n />\n ),\n headerLeft: props => (\n <HeaderBackButton\n style={HEADER_BACK_BUTTON_LAYOUT_RESET_STYLES}\n displayMode=\"minimal\"\n onPress={() => {\n const params = route.params as ConversationRouteProps\n if ((params as ConversationFiltersParams)?.chat_group_graph_id) {\n // Ensure that conversations with a graph id pass them back to the conversation list\n const { chat_group_graph_id } = params\n navigation.popTo('Conversations', { chat_group_graph_id })\n } else {\n navigation.goBack()\n }\n }}\n {...props}\n />\n ),\n }),\n },\n ConversationReply: {\n screen: ConversationScreen,\n options: ({ route, navigation }) => ({\n title: (route.params as ConversationRouteProps)?.title ?? 'Reply',\n headerLeft: props => (\n <HeaderBackButton\n style={HEADER_BACK_BUTTON_LAYOUT_RESET_STYLES}\n displayMode=\"minimal\"\n onPress={() => navigation.goBack()}\n {...props}\n />\n ),\n }),\n },\n TeamConversation: {\n screen: TeamConversationScreen,\n if: useQualifiedByAge,\n options: {\n title: 'Finding conversation...',\n animation: 'none',\n cardStyleInterpolator: CardStyleInterpolators.forNoAnimation,\n },\n },\n ConversationDetails: {\n screen: ConversationDetailsScreen,\n options: ({ navigation }) => ({\n presentation: 'modal',\n title: 'Conversation details',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton {...props} onPress={navigation.goBack} title=\"Done\" />\n ),\n }),\n },\n NotificationSettings: {\n screen: NotificationSettingsScreen,\n options: ({ navigation }) => ({\n title: 'Chat',\n headerBackVisible: false,\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton {...props} onPress={navigation.goBack} title=\"Done\" />\n ),\n }),\n },\n PreferredAppSelection: {\n screen: PreferredAppSelectionScreen,\n options: {\n title: 'Preferred app',\n },\n },\n GroupNotificationSettings: {\n screen: GroupNotificationSettingsScreen,\n options: ({ route, navigation }) => ({\n title: (route.params as { title?: string })?.title || 'Group Settings',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderDoneButton {...props} navigation={navigation} />\n ),\n }),\n },\n GroupNotificationLevelSelect: {\n screen: GroupNotificationLevelSelectScreen,\n options: GroupNotificationLevelSelectScreenOptions,\n },\n ConversationNotificationLevelSelect: {\n screen: ConversationNotificationLevelSelectScreen,\n options: ConversationNotificationLevelSelectScreenOptions,\n },\n New: {\n screen: NewConversationStack,\n if: useQualifiedByAge,\n options: {\n headerShown: false,\n presentation: 'modal',\n },\n },\n SendGiphy: {\n screen: SendGiphyScreen,\n options: SendGiphyScreenOptions,\n },\n MessageActions: {\n screen: MessageActionsScreen,\n // Something about sheetAllowedDetents declared inline breaks TS\n options: MessageActionsScreenOptions,\n },\n MessageReport: {\n screen: MessageReportScreen,\n options: MessageReportScreenOptions,\n },\n AttachmentActions: {\n screen: AttachmentActionsScreen,\n options: AttachmentActionsScreenOptions,\n },\n ConversationSelectType: {\n screen: ConversationSelectTypeScreen,\n options: ConversationSelectTypeScreenOptions,\n },\n Reactions: {\n screen: ReactionsScreen,\n options: ReactionsScreenOptions,\n },\n MessageReadReceipts: {\n screen: MessageReadReceiptsScreen,\n options: MessageReadReceiptsScreenOptions,\n },\n BugReport: {\n screen: BugReportScreen,\n options: BugReportScreenOptions,\n },\n GetHelp: {\n screen: GetHelpScreen,\n options: ({ navigation }) => ({\n headerTitle: 'Get help',\n headerBackVisible: false,\n presentation: 'modal',\n headerRight: props => (\n <HeaderTextButton {...props} onPress={navigation.goBack} title=\"Close\" />\n ),\n }),\n },\n NotFound: {\n screen: NotFound,\n options: {\n title: '404',\n },\n linking: {\n path: '*',\n },\n },\n },\n})\n\ntype ChatStackParamList = StaticParamList<typeof ChatStack>\n\ndeclare global {\n namespace ReactNavigation {\n interface RootParamList extends ChatStackParamList {}\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/navigation/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAE7D,OAAO,EACL,0BAA0B,GAE3B,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAA;AAChE,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACpC,OAAO,EACL,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,qDAAqD,CAAA;AAC5D,OAAO,EACL,uBAAuB,EACvB,8BAA8B,GAC/B,MAAM,yDAAyD,CAAA;AAChE,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAA;AACtF,OAAO,EACL,yBAAyB,EACzB,gCAAgC,GACjC,MAAM,sDAAsD,CAAA;AAC7D,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAA;AAClF,OAAO,EACL,0CAA0C,EAC1C,kCAAkC,GACnC,MAAM,iFAAiF,CAAA;AAExF,OAAO,EACL,yBAAyB,EACzB,gCAAgC,GACjC,MAAM,wCAAwC,CAAA;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,qDAAqD,CAAA;AAC3F,OAAO,EAEL,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAAE,uCAAuC,EAAE,MAAM,uFAAuF,CAAA;AAC/I,OAAO,EAAE,4CAA4C,EAAE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;SAC1C;QACD,SAAS,EAAE;YACT,MAAM,EAAE,eAAe;YACvB,OAAO,EAAE,sBAAsB;SAChC;QACD,OAAO,EAAE;YACP,MAAM,EAAE,aAAa;YACrB,OAAO,EAAE,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,CAAC;gBAC5B,WAAW,EAAE,UAAU;gBACvB,iBAAiB,EAAE,KAAK;gBACxB,YAAY,EAAE,OAAO;gBACrB,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,CACpB,CAAC,gBAAgB,CAAC,IAAI,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,OAAO,EAAG,CAC1E;aACF,CAAC;SACH;QACD,QAAQ,EAAE;YACR,MAAM,EAAE,QAAQ;YAChB,OAAO,EAAE;gBACP,KAAK,EAAE,KAAK;aACb;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,GAAG;aACV;SACF;KACF;CACF,CAAC,CAAA","sourcesContent":["import { HeaderBackButton } from '@react-navigation/elements'\nimport { StaticParamList } from '@react-navigation/native'\nimport {\n createNativeStackNavigator,\n NativeStackHeaderRightProps,\n} from '@react-navigation/native-stack'\nimport { CardStyleInterpolators } from '@react-navigation/stack'\nimport React from 'react'\nimport { Platform } from 'react-native'\nimport { Icon } from '../components'\nimport {\n HeaderDoneButton,\n HeaderTextButton,\n} from '../components/display/platform_modal_header_buttons'\nimport {\n AttachmentActionsScreen,\n AttachmentActionsScreenOptions,\n} from '../screens/attachment_actions/attachment_actions_screen'\nimport { BugReportScreen, BugReportScreenOptions } from '../screens/bug_report_screen'\nimport {\n MessageReadReceiptsScreen,\n MessageReadReceiptsScreenOptions,\n} from '../screens/conversation/message_read_receipts_screen'\nimport { ConversationDetailsScreen } from '../screens/conversation_details_screen'\nimport {\n ConversationFilterReceipientsScreenOptions,\n ConversationFilterRecipientsScreen,\n} from '../screens/conversation_filter_recipients/conversation_filter_recipients_screen'\nimport { ConversationFiltersParams } from '../screens/conversation_filters/screen_props'\nimport {\n ConversationFiltersScreen,\n ConversationFiltersScreenOptions,\n} from '../screens/conversation_filters_screen'\nimport { ConversationNewScreen } from '../screens/conversation_new/conversation_new_screen'\nimport {\n ConversationRouteProps,\n ConversationScreen,\n ConversationScreenTitle,\n} from '../screens/conversation_screen'\nimport { ConversationSelectGroupRecipientsScreen } from '../screens/conversation_select_recipients/conversation_select_group_recipients_screen'\nimport { ConversationSelectTeamsILeadRecipientsScreen } from '../screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen'\nimport { ConversationNewEntryScreen } from '../screens/conversation_select_recipients/conversation_new_entry_screen'\nimport { ConversationSelectRecipientsParams } from '../screens/conversation_select_recipients/types/screen_props'\nimport {\n ConversationSelectTypeScreen,\n ConversationSelectTypeScreenOptions,\n} from '../screens/conversation_select_type_screen'\nimport { ConversationsScreen } from '../screens/conversations/conversations_screen'\nimport { GetHelpScreen } from '../screens/get_help_screen'\nimport {\n MessageActionsScreen,\n MessageActionsScreenOptions,\n} from '../screens/message_actions_screen'\nimport { MessageReportScreen, MessageReportScreenOptions } from '../screens/message_report_screen'\nimport { NotFound } from '../screens/not_found'\nimport { NotificationSettingsScreen } from '../screens/notification_settings_screen'\nimport { PreferredAppSelectionScreen } from '../screens/preferred_app_selection_screen'\nimport { GroupNotificationSettingsScreen } from '../screens/group_notification_settings_screen'\nimport {\n GroupNotificationLevelSelectScreen,\n GroupNotificationLevelSelectScreenOptions,\n} from '../screens/group_notification_level_select_screen'\nimport {\n ConversationNotificationLevelSelectScreen,\n ConversationNotificationLevelSelectScreenOptions,\n} from '../screens/conversation_notification_level_select_screen'\nimport { ReactionsScreen, ReactionsScreenOptions } from '../screens/reactions_screen'\nimport { ScreenLayoutWithChatAccessGate } from './screenLayout'\nimport { SendGiphyScreen, SendGiphyScreenOptions } from '../screens/send_giphy_screen'\nimport { TeamConversationScreen } from '../screens/team_conversation_screen'\nimport { useQualifiedByAge } from '../hooks'\n\nconst HEADER_BACK_BUTTON_LAYOUT_RESET_STYLES = {\n marginLeft: Platform.select({ ios: -8, default: -3 }),\n marginRight: Platform.select({ ios: 0, default: 30 }),\n}\n\nexport const NewConversationStack = createNativeStackNavigator({\n initialRouteName: 'ConversationNewEntry',\n screenOptions: {\n headerBackButtonDisplayMode: 'minimal',\n },\n screenLayout: ScreenLayoutWithChatAccessGate,\n screens: {\n ConversationNewEntry: {\n screen: ConversationNewEntryScreen,\n options: ({ navigation }) => ({\n title: 'New conversation',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton {...props} onPress={navigation.goBack} title=\"Cancel\" />\n ),\n headerBackVisible: false,\n }),\n },\n ConversationSelectGroupRecipients: {\n screen: ConversationSelectGroupRecipientsScreen,\n options: ({ navigation, route }) => ({\n title: 'New conversation',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton\n {...props}\n onPress={() => navigation.popTo('Conversations', route.params)}\n title=\"Cancel\"\n />\n ),\n }),\n },\n ConversationSelectTeamsILeadRecipients: {\n screen: ConversationSelectTeamsILeadRecipientsScreen,\n options: ({ navigation, route }) => ({\n title: 'New conversation',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton\n {...props}\n onPress={() => navigation.popTo('Conversations', route.params)}\n title=\"Cancel\"\n />\n ),\n }),\n },\n ConversationFilterRecipients: {\n screen: ConversationFilterRecipientsScreen,\n options: ConversationFilterReceipientsScreenOptions,\n },\n ConversationNew: {\n screen: ConversationNewScreen,\n options: ({ navigation, route }) => ({\n title: 'New conversation',\n headerLeft: () => null,\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton\n {...props}\n onPress={() => {\n const { chat_group_graph_id, group_source_app_name } =\n route.params as ConversationSelectRecipientsParams\n navigation.popTo('Conversations', { chat_group_graph_id, group_source_app_name })\n }}\n title=\"Cancel\"\n />\n ),\n }),\n },\n },\n})\n\nexport const ChatStack = createNativeStackNavigator({\n screenOptions: {\n headerBackButtonDisplayMode: 'minimal',\n },\n screenLayout: ScreenLayoutWithChatAccessGate,\n screens: {\n Conversations: {\n screen: ConversationsScreen,\n options: ({ route, navigation }) => ({\n headerTitle: (route.params as { title?: string })?.title ?? 'Chat',\n headerBackVisible: false,\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderBackButton\n backImage={() => <Icon name=\"general.x\" size={18} color={props.tintColor} />}\n onPress={navigation.goBack}\n {...props}\n />\n ),\n }),\n },\n ConversationFilters: {\n screen: ConversationFiltersScreen,\n options: ConversationFiltersScreenOptions,\n },\n Conversation: {\n screen: ConversationScreen,\n options: ({ route, navigation }) => ({\n headerTitle: (props: NativeStackHeaderRightProps) => {\n const { conversation_id, title, badge, deleted, muted } =\n route.params as ConversationRouteProps\n\n return (\n <ConversationScreenTitle\n conversation_id={conversation_id}\n badge={badge}\n deleted={deleted}\n muted={muted}\n {...props}\n >\n {title ?? 'Conversation'}\n </ConversationScreenTitle>\n )\n },\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderBackButton\n backImage={() => <Icon name=\"general.x\" size={18} color={props.tintColor} />}\n onPress={() => navigation.getParent()?.goBack()}\n />\n ),\n headerLeft: props => (\n <HeaderBackButton\n style={HEADER_BACK_BUTTON_LAYOUT_RESET_STYLES}\n displayMode=\"minimal\"\n onPress={() => {\n const params = route.params as ConversationRouteProps\n if ((params as ConversationFiltersParams)?.chat_group_graph_id) {\n // Ensure that conversations with a graph id pass them back to the conversation list\n const { chat_group_graph_id } = params\n navigation.popTo('Conversations', { chat_group_graph_id })\n } else {\n navigation.goBack()\n }\n }}\n {...props}\n />\n ),\n }),\n },\n ConversationReply: {\n screen: ConversationScreen,\n options: ({ route, navigation }) => ({\n title: (route.params as ConversationRouteProps)?.title ?? 'Reply',\n headerLeft: props => (\n <HeaderBackButton\n style={HEADER_BACK_BUTTON_LAYOUT_RESET_STYLES}\n displayMode=\"minimal\"\n onPress={() => navigation.goBack()}\n {...props}\n />\n ),\n }),\n },\n TeamConversation: {\n screen: TeamConversationScreen,\n if: useQualifiedByAge,\n options: {\n title: 'Finding conversation...',\n animation: 'none',\n cardStyleInterpolator: CardStyleInterpolators.forNoAnimation,\n },\n },\n ConversationDetails: {\n screen: ConversationDetailsScreen,\n options: ({ navigation }) => ({\n presentation: 'modal',\n title: 'Conversation details',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton {...props} onPress={navigation.goBack} title=\"Done\" />\n ),\n }),\n },\n NotificationSettings: {\n screen: NotificationSettingsScreen,\n options: ({ navigation }) => ({\n title: 'Chat',\n headerBackVisible: false,\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderTextButton {...props} onPress={navigation.goBack} title=\"Done\" />\n ),\n }),\n },\n PreferredAppSelection: {\n screen: PreferredAppSelectionScreen,\n options: {\n title: 'Preferred app',\n },\n },\n GroupNotificationSettings: {\n screen: GroupNotificationSettingsScreen,\n options: ({ route, navigation }) => ({\n title: (route.params as { title?: string })?.title || 'Group Settings',\n headerRight: (props: NativeStackHeaderRightProps) => (\n <HeaderDoneButton {...props} navigation={navigation} />\n ),\n }),\n },\n GroupNotificationLevelSelect: {\n screen: GroupNotificationLevelSelectScreen,\n options: GroupNotificationLevelSelectScreenOptions,\n },\n ConversationNotificationLevelSelect: {\n screen: ConversationNotificationLevelSelectScreen,\n options: ConversationNotificationLevelSelectScreenOptions,\n },\n New: {\n screen: NewConversationStack,\n if: useQualifiedByAge,\n options: {\n headerShown: false,\n presentation: 'modal',\n },\n },\n GroupConversationNew: {\n screen: ConversationNewScreen,\n if: useQualifiedByAge,\n options: ({ navigation }) => ({\n title: 'New conversation',\n headerLeft: () => null,\n headerRight: props => (\n <HeaderTextButton\n {...props}\n onPress={() => navigation.getParent()?.goBack()}\n title=\"Cancel\"\n />\n ),\n }),\n },\n SendGiphy: {\n screen: SendGiphyScreen,\n options: SendGiphyScreenOptions,\n },\n MessageActions: {\n screen: MessageActionsScreen,\n // Something about sheetAllowedDetents declared inline breaks TS\n options: MessageActionsScreenOptions,\n },\n MessageReport: {\n screen: MessageReportScreen,\n options: MessageReportScreenOptions,\n },\n AttachmentActions: {\n screen: AttachmentActionsScreen,\n options: AttachmentActionsScreenOptions,\n },\n ConversationSelectType: {\n screen: ConversationSelectTypeScreen,\n options: ConversationSelectTypeScreenOptions,\n },\n Reactions: {\n screen: ReactionsScreen,\n options: ReactionsScreenOptions,\n },\n MessageReadReceipts: {\n screen: MessageReadReceiptsScreen,\n options: MessageReadReceiptsScreenOptions,\n },\n BugReport: {\n screen: BugReportScreen,\n options: BugReportScreenOptions,\n },\n GetHelp: {\n screen: GetHelpScreen,\n options: ({ navigation }) => ({\n headerTitle: 'Get help',\n headerBackVisible: false,\n presentation: 'modal',\n headerRight: props => (\n <HeaderTextButton {...props} onPress={navigation.goBack} title=\"Close\" />\n ),\n }),\n },\n NotFound: {\n screen: NotFound,\n options: {\n title: '404',\n },\n linking: {\n path: '*',\n },\n },\n },\n})\n\ntype ChatStackParamList = StaticParamList<typeof ChatStack>\n\ndeclare global {\n namespace ReactNavigation {\n interface RootParamList extends ChatStackParamList {}\n }\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { NativeStackNavigationOptions, NativeStackScreenProps } from '@react-navigation/native-stack';
|
|
3
3
|
import { StaticScreenProps } from '@react-navigation/native';
|
|
4
|
-
export declare const MessageReportScreenOptions: ({ navigation, }: NativeStackScreenProps<any>) => NativeStackNavigationOptions;
|
|
4
|
+
export declare const MessageReportScreenOptions: ({ navigation, route, }: NativeStackScreenProps<any>) => NativeStackNavigationOptions;
|
|
5
5
|
export type MessageReportScreenProps = StaticScreenProps<{
|
|
6
6
|
conversation_id: number;
|
|
7
7
|
message_id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message_report_screen.d.ts","sourceRoot":"","sources":["../../src/screens/message_report_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0D,MAAM,OAAO,CAAA;AAE9E,OAAO,KAAK,EACV,4BAA4B,EAC5B,sBAAsB,EACvB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAAE,iBAAiB,EAA+B,MAAM,0BAA0B,CAAA;AAmBzF,eAAO,MAAM,0BAA0B,
|
|
1
|
+
{"version":3,"file":"message_report_screen.d.ts","sourceRoot":"","sources":["../../src/screens/message_report_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0D,MAAM,OAAO,CAAA;AAE9E,OAAO,KAAK,EACV,4BAA4B,EAC5B,sBAAsB,EACvB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAAE,iBAAiB,EAA+B,MAAM,0BAA0B,CAAA;AAmBzF,eAAO,MAAM,0BAA0B,2BAGpC,sBAAsB,CAAC,GAAG,CAAC,KAAG,4BAahC,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG,iBAAiB,CAAC;IACvD,eAAe,EAAE,MAAM,CAAA;IACvB,UAAU,EAAE,MAAM,CAAA;CACnB,CAAC,CAAA;AAEF,wBAAgB,mBAAmB,CAAC,EAAE,KAAK,EAAE,EAAE,wBAAwB,4BAStE"}
|
|
@@ -12,11 +12,16 @@ import { MessagePreview } from './message_report/components/message_preview';
|
|
|
12
12
|
import { ReportReasonList } from './message_report/components/report_reason_list';
|
|
13
13
|
import { platformFontWeightBold } from '../utils';
|
|
14
14
|
const MAX_DETAIL_LENGTH = 500;
|
|
15
|
-
export const MessageReportScreenOptions = ({ navigation, }) =>
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
export const MessageReportScreenOptions = ({ navigation, route, }) => {
|
|
16
|
+
const handleClose = () => navigation.dispatch(StackActions.popTo('Conversation', {
|
|
17
|
+
conversation_id: route.params?.conversation_id,
|
|
18
|
+
}));
|
|
19
|
+
return {
|
|
20
|
+
presentation: 'modal',
|
|
21
|
+
title: 'Report message',
|
|
22
|
+
headerLeft: () => <HeaderDismissButton title="Cancel" onPress={handleClose}/>,
|
|
23
|
+
};
|
|
24
|
+
};
|
|
20
25
|
export function MessageReportScreen({ route }) {
|
|
21
26
|
const { conversation_id, message_id } = route.params;
|
|
22
27
|
const { messages } = useConversationMessages({ conversation_id }, { refetchOnMount: false });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message_report_screen.js","sourceRoot":"","sources":["../../src/screens/message_report_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,eAAe,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC9E,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAKtE,OAAO,EAAqB,aAAa,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AACzF,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAC3D,OAAO,UAAU,MAAM,+CAA+C,CAAA;AACtE,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAC9D,OAAO,EACL,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,qDAAqD,CAAA;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAA;AAG5E,OAAO,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAA;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAA;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAA;AAEjD,MAAM,iBAAiB,GAAG,GAAG,CAAA;AAE7B,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,EACzC,UAAU,GACkB,EAAgC,EAAE,CAAC,CAAC;IAChE,YAAY,EAAE,OAAO;IACrB,KAAK,EAAE,gBAAgB;IACvB,UAAU,EAAE,GAAG,EAAE,CAAC,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EAAE;YACZ,iBAAiB,EAAE,KAAK;YACxB,SAAS,EAAE,GAAG;YACd,SAAS,EAAE,GAAG;YACd,WAAW,EAAE,CAAC;YACd,WAAW,EAAE,MAAM,CAAC,sBAAsB;YAC1C,YAAY,EAAE,CAAC;YACf,iBAAiB,EAAE,EAAE;YACrB,eAAe,EAAE,EAAE;YACnB,eAAe,EAAE,MAAM,CAAC,eAAe;SACxC;QACD,WAAW,EAAE;YACX,KAAK,EAAE,MAAM,CAAC,iBAAiB;YAC/B,QAAQ,EAAE,EAAE;SACb;QACD,YAAY,EAAE;YACZ,QAAQ,EAAE,EAAE;YACZ,YAAY,EAAE,CAAC;SAChB;QACD,eAAe,EAAE;YACf,QAAQ,EAAE,EAAE;YACZ,YAAY,EAAE,CAAC;SAChB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import React, { useCallback, useLayoutEffect, useMemo, useState } from 'react'\nimport { View, StyleSheet, TextInput, ScrollView } from 'react-native'\nimport type {\n NativeStackNavigationOptions,\n NativeStackScreenProps,\n} from '@react-navigation/native-stack'\nimport { StaticScreenProps, useNavigation, StackActions } from '@react-navigation/native'\nimport { Spinner, Text, KeyboardView } from '../components'\nimport BlankState from '../components/primitive/blank_state_primitive'\nimport { useTheme } from '../hooks'\nimport { useReportMessage } from '../hooks/use_report_message'\nimport {\n HeaderDismissButton,\n HeaderTextButton,\n} from '../components/display/platform_modal_header_buttons'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport { useConversationMessages } from '../hooks/use_conversation_messages'\nimport { MessageResource } from '../types'\nimport { MessageReportReason } from '../types/resources/message_report'\nimport { MessagePreview } from './message_report/components/message_preview'\nimport { ReportReasonList } from './message_report/components/report_reason_list'\nimport { platformFontWeightBold } from '../utils'\n\nconst MAX_DETAIL_LENGTH = 500\n\nexport const MessageReportScreenOptions = ({\n navigation,\n}: NativeStackScreenProps<any>): NativeStackNavigationOptions => ({\n presentation: 'modal',\n title: 'Report message',\n headerLeft: () => <HeaderDismissButton title=\"Cancel\" onPress={() => navigation.goBack()} />,\n})\n\nexport type MessageReportScreenProps = StaticScreenProps<{\n conversation_id: number\n message_id: string\n}>\n\nexport function MessageReportScreen({ route }: MessageReportScreenProps) {\n const { conversation_id, message_id } = route.params\n\n const { messages } = useConversationMessages({ conversation_id }, { refetchOnMount: false })\n const message = messages.find(m => m.id === message_id)\n\n if (!message) return null\n\n return <MessageReportScreenContent message={message} conversation_id={conversation_id} />\n}\n\nfunction MessageReportScreenContent({\n message,\n conversation_id,\n}: {\n message: MessageResource\n conversation_id: number\n}) {\n const styles = useStyles()\n const navigation = useNavigation()\n const [selectedReason, setSelectedReason] = useState<MessageReportReason | null>(null)\n const [reasonDetail, setReasonDetail] = useState('')\n const { mutate: submitReport, status } = useReportMessage(conversation_id, message.id)\n\n const handleReasonChange = useCallback((reason: MessageReportReason) => {\n setSelectedReason(reason)\n\n if (reason !== 'other') {\n setReasonDetail('')\n }\n }, [])\n\n const isFormValid = useMemo(() => {\n if (selectedReason === null) return false\n\n if (selectedReason === 'other' && reasonDetail.trim().length === 0) {\n return false\n }\n\n if (status === 'pending') return false\n\n return true\n }, [selectedReason, reasonDetail, status])\n\n const handleSubmit = useCallback(() => {\n if (!isFormValid || !selectedReason) return\n\n submitReport({\n reason: selectedReason,\n reasonDetail: selectedReason === 'other' ? reasonDetail : undefined,\n })\n }, [isFormValid, selectedReason, reasonDetail, submitReport])\n\n const handleClose = useCallback(() => {\n navigation.dispatch(StackActions.popTo('Conversation', { conversation_id }))\n }, [navigation, conversation_id])\n\n const HeaderRight = useCallback(\n () => <HeaderTextButton title=\"Submit\" onPress={handleSubmit} disabled={!isFormValid} />,\n [handleSubmit, isFormValid]\n )\n\n useLayoutEffect(() => {\n if (status === 'pending' || status === 'success') {\n navigation.setOptions({\n headerRight: () => null,\n })\n } else {\n navigation.setOptions({\n headerTitle: 'Report message',\n headerRight: HeaderRight,\n })\n }\n }, [HeaderRight, navigation, status])\n\n if (status === 'pending') {\n return (\n <View style={styles.fullScreenContainer}>\n <Spinner />\n <Text style={styles.loadingText}>Submitting report...</Text>\n </View>\n )\n }\n\n if (status === 'success') {\n return (\n <View style={styles.fullScreenContainer}>\n <BlankState.Root>\n <BlankState.Imagery name=\"general.checkCircle\" style={styles.successIcon} />\n <BlankState.Content>\n <BlankState.Heading style={styles.successTitle}>Message reported</BlankState.Heading>\n <BlankState.Text style={styles.successSubtitle}>\n The message has been reported and a church leader will be contacted.\n </BlankState.Text>\n </BlankState.Content>\n <BlankState.Button title=\"Close\" onPress={handleClose} size=\"lg\" variant=\"fill\" />\n </BlankState.Root>\n </View>\n )\n }\n\n if (status === 'error') {\n return (\n <BlankState.Root>\n <BlankState.Imagery name=\"general.exclamationTriangle\" />\n <BlankState.Content>\n <BlankState.Heading>Unable to submit report</BlankState.Heading>\n <BlankState.Text>\n We were unable to report this message. Please try again.\n </BlankState.Text>\n </BlankState.Content>\n <BlankState.Button title=\"Close\" onPress={handleClose} size=\"lg\" variant=\"outline\" />\n </BlankState.Root>\n )\n }\n\n return (\n <KeyboardView>\n <ScrollView contentContainerStyle={styles.container}>\n <Text style={styles.warningText}>\n Reporting this message will notify a church leader. The person you are reporting will not\n receive a notification from Church Center. If someone is in immediate danger, call local\n emergency services. Don't wait.\n </Text>\n\n <MessagePreview message={message} />\n\n <View style={styles.reasonSection}>\n <Text style={styles.fieldLabel}>\n What best describes the problem? <Text style={styles.required}>*</Text>\n </Text>\n\n <View style={styles.reasonListContainer}>\n <ReportReasonList selectedReason={selectedReason} onReasonChange={handleReasonChange} />\n </View>\n </View>\n\n {selectedReason === 'other' && (\n <View style={styles.detailSection}>\n <Text style={styles.fieldLabel}>\n Please provide more details <Text style={styles.required}>*</Text>\n </Text>\n <TextInput\n style={styles.textInput}\n multiline\n placeholder=\"Describe the issue...\"\n value={reasonDetail}\n onChangeText={setReasonDetail}\n maxLength={MAX_DETAIL_LENGTH}\n accessibilityLabel=\"Additional details\"\n accessibilityHint=\"Provide more information about why you're reporting this message\"\n />\n {reasonDetail.length >= MAX_DETAIL_LENGTH - 100 && (\n <Text variant=\"footnote\">\n {reasonDetail.length}/{MAX_DETAIL_LENGTH}\n </Text>\n )}\n </View>\n )}\n </ScrollView>\n </KeyboardView>\n )\n}\n\nconst useStyles = () => {\n const { bottom } = useSafeAreaInsets()\n const { colors } = useTheme()\n\n return StyleSheet.create({\n container: {\n padding: 16,\n paddingBottom: 16 + bottom,\n gap: 24,\n },\n fullHeight: {\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n },\n fullScreenContainer: {\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n backgroundColor: colors.surfaceColor100,\n },\n loadingText: {\n marginTop: 16,\n fontSize: 16,\n fontWeight: '600',\n color: colors.textColorDefaultPrimary,\n },\n warningText: {\n fontSize: 14,\n lineHeight: 20,\n color: colors.textColorDefaultSecondary,\n },\n reasonSection: {\n gap: 8,\n },\n fieldLabel: {\n fontSize: 16,\n fontWeight: platformFontWeightBold,\n color: colors.textColorDefaultPrimary,\n },\n required: {\n color: colors.statusErrorText,\n },\n reasonListContainer: {\n backgroundColor: colors.surfaceColor100,\n },\n detailSection: {\n gap: 8,\n },\n textInput: {\n color: colors.textColorDefaultPrimary,\n fontSize: 16,\n textAlignVertical: 'top',\n minHeight: 120,\n maxHeight: 200,\n borderWidth: 1,\n borderColor: colors.borderColorDefaultBase,\n borderRadius: 8,\n paddingHorizontal: 16,\n paddingVertical: 12,\n backgroundColor: colors.surfaceColor100,\n },\n successIcon: {\n color: colors.statusSuccessIcon,\n fontSize: 48,\n },\n successTitle: {\n fontSize: 24,\n marginBottom: 4,\n },\n successSubtitle: {\n fontSize: 16,\n marginBottom: 4,\n },\n })\n}\n"]}
|
|
1
|
+
{"version":3,"file":"message_report_screen.js","sourceRoot":"","sources":["../../src/screens/message_report_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,eAAe,EAAE,OAAO,EAAE,QAAQ,EAAE,M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1C,YAAY,EAAE,CAAC;YACf,iBAAiB,EAAE,EAAE;YACrB,eAAe,EAAE,EAAE;YACnB,eAAe,EAAE,MAAM,CAAC,eAAe;SACxC;QACD,WAAW,EAAE;YACX,KAAK,EAAE,MAAM,CAAC,iBAAiB;YAC/B,QAAQ,EAAE,EAAE;SACb;QACD,YAAY,EAAE;YACZ,QAAQ,EAAE,EAAE;YACZ,YAAY,EAAE,CAAC;SAChB;QACD,eAAe,EAAE;YACf,QAAQ,EAAE,EAAE;YACZ,YAAY,EAAE,CAAC;SAChB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import React, { useCallback, useLayoutEffect, useMemo, useState } from 'react'\nimport { View, StyleSheet, TextInput, ScrollView } from 'react-native'\nimport type {\n NativeStackNavigationOptions,\n NativeStackScreenProps,\n} from '@react-navigation/native-stack'\nimport { StaticScreenProps, useNavigation, StackActions } from '@react-navigation/native'\nimport { Spinner, Text, KeyboardView } from '../components'\nimport BlankState from '../components/primitive/blank_state_primitive'\nimport { useTheme } from '../hooks'\nimport { useReportMessage } from '../hooks/use_report_message'\nimport {\n HeaderDismissButton,\n HeaderTextButton,\n} from '../components/display/platform_modal_header_buttons'\nimport { useSafeAreaInsets } from 'react-native-safe-area-context'\nimport { useConversationMessages } from '../hooks/use_conversation_messages'\nimport { MessageResource } from '../types'\nimport { MessageReportReason } from '../types/resources/message_report'\nimport { MessagePreview } from './message_report/components/message_preview'\nimport { ReportReasonList } from './message_report/components/report_reason_list'\nimport { platformFontWeightBold } from '../utils'\n\nconst MAX_DETAIL_LENGTH = 500\n\nexport const MessageReportScreenOptions = ({\n navigation,\n route,\n}: NativeStackScreenProps<any>): NativeStackNavigationOptions => {\n const handleClose = () =>\n navigation.dispatch(\n StackActions.popTo('Conversation', {\n conversation_id: route.params?.conversation_id,\n })\n )\n\n return {\n presentation: 'modal',\n title: 'Report message',\n headerLeft: () => <HeaderDismissButton title=\"Cancel\" onPress={handleClose} />,\n }\n}\n\nexport type MessageReportScreenProps = StaticScreenProps<{\n conversation_id: number\n message_id: string\n}>\n\nexport function MessageReportScreen({ route }: MessageReportScreenProps) {\n const { conversation_id, message_id } = route.params\n\n const { messages } = useConversationMessages({ conversation_id }, { refetchOnMount: false })\n const message = messages.find(m => m.id === message_id)\n\n if (!message) return null\n\n return <MessageReportScreenContent message={message} conversation_id={conversation_id} />\n}\n\nfunction MessageReportScreenContent({\n message,\n conversation_id,\n}: {\n message: MessageResource\n conversation_id: number\n}) {\n const styles = useStyles()\n const navigation = useNavigation()\n const [selectedReason, setSelectedReason] = useState<MessageReportReason | null>(null)\n const [reasonDetail, setReasonDetail] = useState('')\n const { mutate: submitReport, status } = useReportMessage(conversation_id, message.id)\n\n const handleReasonChange = useCallback((reason: MessageReportReason) => {\n setSelectedReason(reason)\n\n if (reason !== 'other') {\n setReasonDetail('')\n }\n }, [])\n\n const isFormValid = useMemo(() => {\n if (selectedReason === null) return false\n\n if (selectedReason === 'other' && reasonDetail.trim().length === 0) {\n return false\n }\n\n if (status === 'pending') return false\n\n return true\n }, [selectedReason, reasonDetail, status])\n\n const handleSubmit = useCallback(() => {\n if (!isFormValid || !selectedReason) return\n\n submitReport({\n reason: selectedReason,\n reasonDetail: selectedReason === 'other' ? reasonDetail : undefined,\n })\n }, [isFormValid, selectedReason, reasonDetail, submitReport])\n\n const handleClose = useCallback(() => {\n navigation.dispatch(StackActions.popTo('Conversation', { conversation_id }))\n }, [navigation, conversation_id])\n\n const HeaderRight = useCallback(\n () => <HeaderTextButton title=\"Submit\" onPress={handleSubmit} disabled={!isFormValid} />,\n [handleSubmit, isFormValid]\n )\n\n useLayoutEffect(() => {\n if (status === 'pending' || status === 'success') {\n navigation.setOptions({\n headerRight: () => null,\n })\n } else {\n navigation.setOptions({\n headerTitle: 'Report message',\n headerRight: HeaderRight,\n })\n }\n }, [HeaderRight, navigation, status])\n\n if (status === 'pending') {\n return (\n <View style={styles.fullScreenContainer}>\n <Spinner />\n <Text style={styles.loadingText}>Submitting report...</Text>\n </View>\n )\n }\n\n if (status === 'success') {\n return (\n <View style={styles.fullScreenContainer}>\n <BlankState.Root>\n <BlankState.Imagery name=\"general.checkCircle\" style={styles.successIcon} />\n <BlankState.Content>\n <BlankState.Heading style={styles.successTitle}>Message reported</BlankState.Heading>\n <BlankState.Text style={styles.successSubtitle}>\n The message has been reported and a church leader will be contacted.\n </BlankState.Text>\n </BlankState.Content>\n <BlankState.Button title=\"Close\" onPress={handleClose} size=\"lg\" variant=\"fill\" />\n </BlankState.Root>\n </View>\n )\n }\n\n if (status === 'error') {\n return (\n <BlankState.Root>\n <BlankState.Imagery name=\"general.exclamationTriangle\" />\n <BlankState.Content>\n <BlankState.Heading>Unable to submit report</BlankState.Heading>\n <BlankState.Text>\n We were unable to report this message. Please try again.\n </BlankState.Text>\n </BlankState.Content>\n <BlankState.Button title=\"Close\" onPress={handleClose} size=\"lg\" variant=\"outline\" />\n </BlankState.Root>\n )\n }\n\n return (\n <KeyboardView>\n <ScrollView contentContainerStyle={styles.container}>\n <Text style={styles.warningText}>\n Reporting this message will notify a church leader. The person you are reporting will not\n receive a notification from Church Center. If someone is in immediate danger, call local\n emergency services. Don't wait.\n </Text>\n\n <MessagePreview message={message} />\n\n <View style={styles.reasonSection}>\n <Text style={styles.fieldLabel}>\n What best describes the problem? <Text style={styles.required}>*</Text>\n </Text>\n\n <View style={styles.reasonListContainer}>\n <ReportReasonList selectedReason={selectedReason} onReasonChange={handleReasonChange} />\n </View>\n </View>\n\n {selectedReason === 'other' && (\n <View style={styles.detailSection}>\n <Text style={styles.fieldLabel}>\n Please provide more details <Text style={styles.required}>*</Text>\n </Text>\n <TextInput\n style={styles.textInput}\n multiline\n placeholder=\"Describe the issue...\"\n value={reasonDetail}\n onChangeText={setReasonDetail}\n maxLength={MAX_DETAIL_LENGTH}\n accessibilityLabel=\"Additional details\"\n accessibilityHint=\"Provide more information about why you're reporting this message\"\n />\n {reasonDetail.length >= MAX_DETAIL_LENGTH - 100 && (\n <Text variant=\"footnote\">\n {reasonDetail.length}/{MAX_DETAIL_LENGTH}\n </Text>\n )}\n </View>\n )}\n </ScrollView>\n </KeyboardView>\n )\n}\n\nconst useStyles = () => {\n const { bottom } = useSafeAreaInsets()\n const { colors } = useTheme()\n\n return StyleSheet.create({\n container: {\n padding: 16,\n paddingBottom: 16 + bottom,\n gap: 24,\n },\n fullHeight: {\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n },\n fullScreenContainer: {\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n backgroundColor: colors.surfaceColor100,\n },\n loadingText: {\n marginTop: 16,\n fontSize: 16,\n fontWeight: '600',\n color: colors.textColorDefaultPrimary,\n },\n warningText: {\n fontSize: 14,\n lineHeight: 20,\n color: colors.textColorDefaultSecondary,\n },\n reasonSection: {\n gap: 8,\n },\n fieldLabel: {\n fontSize: 16,\n fontWeight: platformFontWeightBold,\n color: colors.textColorDefaultPrimary,\n },\n required: {\n color: colors.statusErrorText,\n },\n reasonListContainer: {\n backgroundColor: colors.surfaceColor100,\n },\n detailSection: {\n gap: 8,\n },\n textInput: {\n color: colors.textColorDefaultPrimary,\n fontSize: 16,\n textAlignVertical: 'top',\n minHeight: 120,\n maxHeight: 200,\n borderWidth: 1,\n borderColor: colors.borderColorDefaultBase,\n borderRadius: 8,\n paddingHorizontal: 16,\n paddingVertical: 12,\n backgroundColor: colors.surfaceColor100,\n },\n successIcon: {\n color: colors.statusSuccessIcon,\n fontSize: 48,\n },\n successTitle: {\n fontSize: 24,\n marginBottom: 4,\n },\n successSubtitle: {\n fontSize: 16,\n marginBottom: 4,\n },\n })\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@planningcenter/chat-react-native",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.26.0-rc.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"react-native-url-polyfill": "^2.0.0",
|
|
60
60
|
"typescript": "<5.6.0"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "1eafd8d4c439a41864e5468233aa14c27a2439ff"
|
|
63
63
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react'
|
|
1
|
+
import React, { useEffect } from 'react'
|
|
2
2
|
import { StyleSheet, View, ViewStyle } from 'react-native'
|
|
3
3
|
import { ConversationPreview } from './conversations/conversation_preview'
|
|
4
4
|
import { ConversationRequestArgs } from '../utils/request/conversation'
|
|
@@ -13,12 +13,16 @@ interface GroupConversationsProps extends Partial<ConversationRequestArgs> {
|
|
|
13
13
|
limit?: number
|
|
14
14
|
onConversationPress: (conversation: any) => void
|
|
15
15
|
style?: ViewStyle
|
|
16
|
+
onConversationsLoad?: ({ hasConversations }: { hasConversations: boolean }) => void
|
|
16
17
|
ListHeaderComponent?:
|
|
17
18
|
| React.ComponentType<any>
|
|
18
19
|
| React.ReactElement<any, string | React.JSXElementConstructor<any>>
|
|
19
20
|
ListOverflowFooterComponent?:
|
|
20
21
|
| React.ComponentType<any>
|
|
21
22
|
| React.ReactElement<any, string | React.JSXElementConstructor<any>>
|
|
23
|
+
ListEmptyFooterComponent?:
|
|
24
|
+
| React.ComponentType<any>
|
|
25
|
+
| React.ReactElement<any, string | React.JSXElementConstructor<any>>
|
|
22
26
|
}
|
|
23
27
|
|
|
24
28
|
/**
|
|
@@ -39,19 +43,28 @@ const GroupConversationList = ({
|
|
|
39
43
|
limit,
|
|
40
44
|
onConversationPress,
|
|
41
45
|
style,
|
|
46
|
+
onConversationsLoad,
|
|
42
47
|
ListHeaderComponent,
|
|
43
48
|
ListOverflowFooterComponent,
|
|
49
|
+
ListEmptyFooterComponent,
|
|
44
50
|
}: GroupConversationsProps) => {
|
|
45
51
|
const styles = useStyles()
|
|
46
|
-
const { conversations = [] } = useConversationsContext()
|
|
52
|
+
const { conversations = [], isFetched } = useConversationsContext()
|
|
53
|
+
|
|
54
|
+
useEffect(() => {
|
|
55
|
+
if (isFetched) {
|
|
56
|
+
onConversationsLoad?.({ hasConversations: conversations.length > 0 })
|
|
57
|
+
}
|
|
58
|
+
}, [conversations.length, isFetched, onConversationsLoad])
|
|
47
59
|
|
|
48
60
|
return (
|
|
49
61
|
<View style={style}>
|
|
50
62
|
<>{ListHeaderComponent}</>
|
|
51
|
-
{conversations.length === 0 && (
|
|
63
|
+
{isFetched && conversations.length === 0 && (
|
|
52
64
|
<View style={styles.listEmpty}>
|
|
53
65
|
<Icon size={24} name="general.textMessage" style={styles.listEmptyIcon} />
|
|
54
66
|
<Text variant="secondary">No conversations found</Text>
|
|
67
|
+
<>{ListEmptyFooterComponent}</>
|
|
55
68
|
</View>
|
|
56
69
|
)}
|
|
57
70
|
{conversations.slice(0, limit).map(conversation => (
|
package/src/navigation/index.tsx
CHANGED
|
@@ -285,6 +285,21 @@ export const ChatStack = createNativeStackNavigator({
|
|
|
285
285
|
presentation: 'modal',
|
|
286
286
|
},
|
|
287
287
|
},
|
|
288
|
+
GroupConversationNew: {
|
|
289
|
+
screen: ConversationNewScreen,
|
|
290
|
+
if: useQualifiedByAge,
|
|
291
|
+
options: ({ navigation }) => ({
|
|
292
|
+
title: 'New conversation',
|
|
293
|
+
headerLeft: () => null,
|
|
294
|
+
headerRight: props => (
|
|
295
|
+
<HeaderTextButton
|
|
296
|
+
{...props}
|
|
297
|
+
onPress={() => navigation.getParent()?.goBack()}
|
|
298
|
+
title="Cancel"
|
|
299
|
+
/>
|
|
300
|
+
),
|
|
301
|
+
}),
|
|
302
|
+
},
|
|
288
303
|
SendGiphy: {
|
|
289
304
|
screen: SendGiphyScreen,
|
|
290
305
|
options: SendGiphyScreenOptions,
|
|
@@ -25,11 +25,21 @@ const MAX_DETAIL_LENGTH = 500
|
|
|
25
25
|
|
|
26
26
|
export const MessageReportScreenOptions = ({
|
|
27
27
|
navigation,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
route,
|
|
29
|
+
}: NativeStackScreenProps<any>): NativeStackNavigationOptions => {
|
|
30
|
+
const handleClose = () =>
|
|
31
|
+
navigation.dispatch(
|
|
32
|
+
StackActions.popTo('Conversation', {
|
|
33
|
+
conversation_id: route.params?.conversation_id,
|
|
34
|
+
})
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
return {
|
|
38
|
+
presentation: 'modal',
|
|
39
|
+
title: 'Report message',
|
|
40
|
+
headerLeft: () => <HeaderDismissButton title="Cancel" onPress={handleClose} />,
|
|
41
|
+
}
|
|
42
|
+
}
|
|
33
43
|
|
|
34
44
|
export type MessageReportScreenProps = StaticScreenProps<{
|
|
35
45
|
conversation_id: number
|