@planningcenter/chat-react-native 4.5.1-rc.0 → 4.6.0-qa-1063.0
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/assets/powered_by_giphy.png +0 -0
- package/assets/powered_by_giphy_dark.png +0 -0
- package/build/components/conversation/attachments/giphy_attachment.d.ts.map +1 -1
- package/build/components/conversation/attachments/giphy_attachment.js +2 -2
- package/build/components/conversation/attachments/giphy_attachment.js.map +1 -1
- package/build/components/conversation/attachments/image_attachment.d.ts.map +1 -1
- package/build/components/conversation/attachments/image_attachment.js +5 -3
- package/build/components/conversation/attachments/image_attachment.js.map +1 -1
- package/build/components/conversation/message_form.d.ts.map +1 -1
- package/build/components/conversation/message_form.js +2 -2
- package/build/components/conversation/message_form.js.map +1 -1
- package/build/components/conversation/message_list.d.ts.map +1 -1
- package/build/components/conversation/message_list.js +155 -123
- package/build/components/conversation/message_list.js.map +1 -1
- package/build/components/conversations/conversations.d.ts.map +1 -1
- package/build/components/conversations/conversations.js +1 -0
- package/build/components/conversations/conversations.js.map +1 -1
- package/build/components/display/conversation_avatar.d.ts +3 -1
- package/build/components/display/conversation_avatar.d.ts.map +1 -1
- package/build/components/display/conversation_avatar.js +77 -66
- package/build/components/display/conversation_avatar.js.map +1 -1
- package/build/components/display/keyboard_scroll_view.d.ts.map +1 -1
- package/build/components/display/keyboard_scroll_view.js +1 -0
- package/build/components/display/keyboard_scroll_view.js.map +1 -1
- package/build/components/page/page_error_boundary.d.ts +9 -1
- package/build/components/page/page_error_boundary.d.ts.map +1 -1
- package/build/components/page/page_error_boundary.js +56 -31
- package/build/components/page/page_error_boundary.js.map +1 -1
- package/build/hooks/use_conversation_avatar_update.d.ts +4 -3
- package/build/hooks/use_conversation_avatar_update.d.ts.map +1 -1
- package/build/hooks/use_conversation_avatar_update.js +146 -48
- package/build/hooks/use_conversation_avatar_update.js.map +1 -1
- package/build/navigation/index.d.ts.map +1 -1
- package/build/navigation/index.js +3 -1
- package/build/navigation/index.js.map +1 -1
- package/build/navigation/page_error_fallbacks.d.ts +7 -0
- package/build/navigation/page_error_fallbacks.d.ts.map +1 -0
- package/build/navigation/page_error_fallbacks.js +7 -0
- package/build/navigation/page_error_fallbacks.js.map +1 -0
- package/build/navigation/screenLayout.d.ts.map +1 -1
- package/build/navigation/screenLayout.js +10 -6
- package/build/navigation/screenLayout.js.map +1 -1
- package/build/screens/age_check/age_check_required_screen.d.ts.map +1 -1
- package/build/screens/age_check/age_check_required_screen.js +1 -0
- package/build/screens/age_check/age_check_required_screen.js.map +1 -1
- package/build/screens/age_check/age_check_underage_screen.d.ts.map +1 -1
- package/build/screens/age_check/age_check_underage_screen.js +2 -1
- package/build/screens/age_check/age_check_underage_screen.js.map +1 -1
- package/build/screens/attachment_actions/attachment_actions_screen.d.ts.map +1 -1
- package/build/screens/attachment_actions/attachment_actions_screen.js +5 -2
- package/build/screens/attachment_actions/attachment_actions_screen.js.map +1 -1
- package/build/screens/avatar_picker/avatar_picker_screen.d.ts.map +1 -1
- package/build/screens/avatar_picker/avatar_picker_screen.js +76 -66
- package/build/screens/avatar_picker/avatar_picker_screen.js.map +1 -1
- package/build/screens/bug_report_screen.d.ts.map +1 -1
- package/build/screens/bug_report_screen.js +3 -3
- package/build/screens/bug_report_screen.js.map +1 -1
- package/build/screens/conversation_details_screen.d.ts.map +1 -1
- package/build/screens/conversation_details_screen.js +1 -0
- package/build/screens/conversation_details_screen.js.map +1 -1
- package/build/screens/conversation_new/components/form_list.d.ts.map +1 -1
- package/build/screens/conversation_new/components/form_list.js +1 -0
- package/build/screens/conversation_new/components/form_list.js.map +1 -1
- package/build/screens/conversation_new/components/groups_form.js +25 -18
- package/build/screens/conversation_new/components/groups_form.js.map +1 -1
- package/build/screens/conversation_new/components/services_form.js +51 -40
- package/build/screens/conversation_new/components/services_form.js.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_new_entry_screen.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_new_entry_screen.js +1 -0
- package/build/screens/conversation_select_recipients/conversation_new_entry_screen.js.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.js +332 -291
- package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.js.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.js +2 -1
- package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.js.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.js +1 -0
- package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.js.map +1 -1
- package/build/screens/get_help_screen.js +57 -63
- package/build/screens/get_help_screen.js.map +1 -1
- package/build/screens/group_notification_settings_screen.js +3 -2
- package/build/screens/group_notification_settings_screen.js.map +1 -1
- package/build/screens/notification_settings_screen.d.ts.map +1 -1
- package/build/screens/notification_settings_screen.js +1 -0
- package/build/screens/notification_settings_screen.js.map +1 -1
- package/build/screens/preferred_app_selection_screen.js +45 -39
- package/build/screens/preferred_app_selection_screen.js.map +1 -1
- package/build/screens/search/components/search_results_list.d.ts +4 -1
- package/build/screens/search/components/search_results_list.d.ts.map +1 -1
- package/build/screens/search/components/search_results_list.js +136 -110
- package/build/screens/search/components/search_results_list.js.map +1 -1
- package/build/screens/search/search_screen.d.ts.map +1 -1
- package/build/screens/search/search_screen.js +21 -28
- package/build/screens/search/search_screen.js.map +1 -1
- package/build/screens/send_giphy_screen.d.ts.map +1 -1
- package/build/screens/send_giphy_screen.js +93 -136
- package/build/screens/send_giphy_screen.js.map +1 -1
- package/build/screens/settings_screen.d.ts.map +1 -1
- package/build/screens/settings_screen.js +7 -6
- package/build/screens/settings_screen.js.map +1 -1
- package/build/utils/index.d.ts +1 -0
- package/build/utils/index.d.ts.map +1 -1
- package/build/utils/index.js +1 -0
- package/build/utils/index.js.map +1 -1
- package/build/utils/membership_sync_info_text.d.ts +2 -0
- package/build/utils/membership_sync_info_text.d.ts.map +1 -0
- package/build/utils/membership_sync_info_text.js +4 -0
- package/build/utils/membership_sync_info_text.js.map +1 -0
- package/build/utils/native_adapters/linking.d.ts +11 -3
- package/build/utils/native_adapters/linking.d.ts.map +1 -1
- package/build/utils/native_adapters/linking.js.map +1 -1
- package/package.json +3 -3
- package/src/__tests__/components/conversation/attachments/giphy_attachment.test.tsx +76 -0
- package/src/__tests__/screens/get_help_screen.test.ts +36 -0
- package/src/__utils__/render_with_query_client.tsx +13 -0
- package/src/components/conversation/__tests__/message_list.test.tsx +4 -0
- package/src/components/conversation/attachments/giphy_attachment.tsx +2 -3
- package/src/components/conversation/attachments/image_attachment.tsx +2 -3
- package/src/components/conversation/message_form.tsx +1 -1
- package/src/components/conversation/message_list.tsx +6 -0
- package/src/components/conversations/__tests__/conversation_preview.test.tsx +2 -2
- package/src/components/conversations/conversations.tsx +1 -0
- package/src/components/display/__tests__/conversation_avatar.test.tsx +94 -0
- package/src/components/display/conversation_avatar.tsx +9 -2
- package/src/components/display/keyboard_scroll_view.tsx +1 -0
- package/src/components/page/__tests__/page_error_boundary.test.tsx +33 -0
- package/src/components/page/page_error_boundary.tsx +43 -12
- package/src/hooks/__tests__/use_conversation_avatar_update.test.tsx +40 -0
- package/src/hooks/use_conversation_avatar_update.ts +67 -11
- package/src/navigation/index.tsx +6 -2
- package/src/navigation/page_error_fallbacks.ts +14 -0
- package/src/navigation/screenLayout.tsx +3 -1
- package/src/screens/age_check/age_check_required_screen.tsx +5 -1
- package/src/screens/age_check/age_check_underage_screen.tsx +2 -1
- package/src/screens/attachment_actions/__tests__/attachment_actions_screen.test.tsx +37 -1
- package/src/screens/attachment_actions/attachment_actions_screen.tsx +3 -2
- package/src/screens/avatar_picker/__tests__/avatar_picker_screen.test.tsx +67 -0
- package/src/screens/avatar_picker/avatar_picker_screen.tsx +7 -1
- package/src/screens/bug_report_screen.tsx +3 -11
- package/src/screens/conversation_details_screen.tsx +1 -0
- package/src/screens/conversation_new/components/form_list.tsx +1 -0
- package/src/screens/conversation_new/components/groups_form.tsx +2 -2
- package/src/screens/conversation_new/components/services_form.tsx +2 -2
- package/src/screens/conversation_select_recipients/__tests__/conversation_select_direct_message_recipients_screen.test.tsx +100 -0
- package/src/screens/conversation_select_recipients/conversation_new_entry_screen.tsx +4 -1
- package/src/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.tsx +78 -68
- package/src/screens/conversation_select_recipients/conversation_select_group_recipients_screen.tsx +2 -1
- package/src/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.tsx +1 -0
- package/src/screens/get_help_screen.tsx +5 -5
- package/src/screens/group_notification_settings_screen.tsx +3 -3
- package/src/screens/notification_settings_screen.tsx +1 -0
- package/src/screens/preferred_app_selection_screen.tsx +4 -4
- package/src/screens/search/__tests__/search_screen.test.tsx +11 -12
- package/src/screens/search/components/__tests__/conversation_results.test.tsx +14 -5
- package/src/screens/search/components/__tests__/message_result_row.test.tsx +5 -4
- package/src/screens/search/components/__tests__/search_results_list.test.tsx +10 -5
- package/src/screens/search/components/search_results_list.tsx +34 -13
- package/src/screens/search/search_screen.tsx +8 -18
- package/src/screens/send_giphy_screen.tsx +13 -44
- package/src/screens/settings_screen.tsx +25 -25
- package/src/utils/__tests__/membership_sync_info_text.test.ts +15 -0
- package/src/utils/index.ts +1 -0
- package/src/utils/membership_sync_info_text.ts +3 -0
- package/src/utils/native_adapters/__tests__/linking.test.ts +12 -0
- package/src/utils/native_adapters/linking.ts +12 -3
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
NativeStackScreenProps,
|
|
5
5
|
} from '@react-navigation/native-stack'
|
|
6
6
|
import React, { useRef, useState } from 'react'
|
|
7
|
-
import { Keyboard,
|
|
7
|
+
import { Keyboard, StyleSheet, View } from 'react-native'
|
|
8
8
|
import { KeyboardView } from '../../components'
|
|
9
9
|
import {
|
|
10
10
|
composeOptions,
|
|
@@ -64,19 +64,13 @@ export function SearchScreen() {
|
|
|
64
64
|
return (
|
|
65
65
|
<KeyboardView>
|
|
66
66
|
<View style={styles.container} testID="search-screen">
|
|
67
|
-
<
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
/>
|
|
75
|
-
) : (
|
|
76
|
-
<ScrollView contentContainerStyle={styles.prompt} keyboardShouldPersistTaps="handled">
|
|
77
|
-
<SearchPromptBlankState />
|
|
78
|
-
</ScrollView>
|
|
79
|
-
)}
|
|
67
|
+
<SearchResultsList
|
|
68
|
+
term={debouncedTerm}
|
|
69
|
+
onSelect={openResult}
|
|
70
|
+
onSettled={publishSearch}
|
|
71
|
+
header={<SearchField term={term} onChange={setTerm} />}
|
|
72
|
+
prompt={<SearchPromptBlankState />}
|
|
73
|
+
/>
|
|
80
74
|
</View>
|
|
81
75
|
</KeyboardView>
|
|
82
76
|
)
|
|
@@ -86,8 +80,4 @@ const styles = StyleSheet.create({
|
|
|
86
80
|
container: {
|
|
87
81
|
flex: 1,
|
|
88
82
|
},
|
|
89
|
-
prompt: {
|
|
90
|
-
flexGrow: 1,
|
|
91
|
-
justifyContent: 'center',
|
|
92
|
-
},
|
|
93
83
|
})
|
|
@@ -8,7 +8,6 @@ import FormSheet, { getFormSheetScreenOptions } from '../components/primitive/fo
|
|
|
8
8
|
import { useCreateAndroidRippleColor, useTheme } from '../hooks'
|
|
9
9
|
import { useGiphy } from '../hooks/use_giphy'
|
|
10
10
|
import { useMessageCreateOrUpdate } from '../hooks/use_message_create_or_update'
|
|
11
|
-
import { tokens } from '../vendor/tapestry/tokens'
|
|
12
11
|
|
|
13
12
|
export const SendGiphyScreenOptions = getFormSheetScreenOptions({
|
|
14
13
|
headerTitle: 'Send Giphy',
|
|
@@ -24,6 +23,7 @@ export type SendGiphyScreenProps = StaticScreenProps<{
|
|
|
24
23
|
export function SendGiphyScreen({ route }: SendGiphyScreenProps) {
|
|
25
24
|
const { conversation_id, reply_root_id, search_term } = route.params
|
|
26
25
|
const styles = useStyles()
|
|
26
|
+
const { colors } = useTheme()
|
|
27
27
|
const navigation = useNavigation()
|
|
28
28
|
|
|
29
29
|
const { isPending, mutate } = useMessageCreateOrUpdate({
|
|
@@ -78,15 +78,18 @@ export function SendGiphyScreen({ route }: SendGiphyScreenProps) {
|
|
|
78
78
|
goBack({ clearInput: true })
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
+
const poweredByGiphyImage =
|
|
82
|
+
colors.name === 'dark'
|
|
83
|
+
? require('../../assets/powered_by_giphy_dark.png')
|
|
84
|
+
: require('../../assets/powered_by_giphy.png')
|
|
85
|
+
|
|
81
86
|
return (
|
|
82
87
|
<FormSheet.Root contentStyle={styles.container}>
|
|
83
|
-
<
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
/>
|
|
89
|
-
</View>
|
|
88
|
+
<NativeImage
|
|
89
|
+
alt="Powered by Giphy"
|
|
90
|
+
style={styles.poweredByGiphyImage}
|
|
91
|
+
source={poweredByGiphyImage}
|
|
92
|
+
/>
|
|
90
93
|
<View style={styles.controlToolbar} accessibilityRole="toolbar">
|
|
91
94
|
<View style={styles.paginateButtonGroup}>
|
|
92
95
|
<PaginateButton
|
|
@@ -181,15 +184,10 @@ const useStyles = () => {
|
|
|
181
184
|
flex: 0,
|
|
182
185
|
flexGrow: 1,
|
|
183
186
|
},
|
|
184
|
-
poweredByGiphyContainer: {
|
|
185
|
-
alignSelf: 'flex-start',
|
|
186
|
-
padding: 4,
|
|
187
|
-
borderRadius: 4,
|
|
188
|
-
backgroundColor: colors.name === 'dark' ? tokens.colorNeutral68 : 'transparent',
|
|
189
|
-
},
|
|
190
187
|
poweredByGiphyImage: {
|
|
191
|
-
|
|
188
|
+
alignSelf: 'flex-start',
|
|
192
189
|
height: 20,
|
|
190
|
+
aspectRatio: 641 / 71,
|
|
193
191
|
},
|
|
194
192
|
controlToolbar: {
|
|
195
193
|
flexDirection: 'row',
|
|
@@ -223,32 +221,3 @@ const useStyles = () => {
|
|
|
223
221
|
},
|
|
224
222
|
})
|
|
225
223
|
}
|
|
226
|
-
|
|
227
|
-
const poweredByGiphyImage = `data:image/png;base64,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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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`
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PlatformPressable } from '@react-navigation/elements'
|
|
2
2
|
import { StaticScreenProps, useNavigation } from '@react-navigation/native'
|
|
3
3
|
import React, { useCallback } from 'react'
|
|
4
|
-
import { Platform, StyleSheet, View } from 'react-native'
|
|
4
|
+
import { Platform, ScrollView, StyleSheet, View } from 'react-native'
|
|
5
5
|
import { useSafeAreaInsets } from 'react-native-safe-area-context'
|
|
6
6
|
import { Heading, Icon, Text, VersionFooter } from '../components'
|
|
7
7
|
import { Switch } from '../components/display/switch'
|
|
@@ -28,29 +28,31 @@ export function SettingsScreen({}: SettingsScreenProps) {
|
|
|
28
28
|
|
|
29
29
|
return (
|
|
30
30
|
<View style={styles.container}>
|
|
31
|
-
<
|
|
32
|
-
<View style={styles.
|
|
33
|
-
<
|
|
34
|
-
|
|
35
|
-
{directMessagesEligible && (
|
|
36
|
-
<View style={styles.settingRow}>
|
|
37
|
-
<View style={styles.settingRowText}>
|
|
38
|
-
<Text>Allow direct messages</Text>
|
|
39
|
-
<Text variant="tertiary">
|
|
40
|
-
When off, you can't be added to new direct messages, and any you're already in will
|
|
41
|
-
be turned off.
|
|
42
|
-
</Text>
|
|
43
|
-
</View>
|
|
44
|
-
<Switch
|
|
45
|
-
value={!directMessagesDisabled}
|
|
46
|
-
onValueChange={enabled => setDirectMessagesDisabled(!enabled)}
|
|
47
|
-
disabled={isMutating}
|
|
48
|
-
/>
|
|
31
|
+
<ScrollView contentInsetAdjustmentBehavior="automatic">
|
|
32
|
+
<View style={styles.sectionOuter}>
|
|
33
|
+
<View style={styles.sectionHeader}>
|
|
34
|
+
<Heading variant="h2">Messages</Heading>
|
|
49
35
|
</View>
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
36
|
+
{directMessagesEligible && (
|
|
37
|
+
<View style={styles.settingRow}>
|
|
38
|
+
<View style={styles.settingRowText}>
|
|
39
|
+
<Text>Allow direct messages</Text>
|
|
40
|
+
<Text variant="tertiary">
|
|
41
|
+
When off, you can't be added to new direct messages, and any you're already in
|
|
42
|
+
will be turned off.
|
|
43
|
+
</Text>
|
|
44
|
+
</View>
|
|
45
|
+
<Switch
|
|
46
|
+
value={!directMessagesDisabled}
|
|
47
|
+
onValueChange={enabled => setDirectMessagesDisabled(!enabled)}
|
|
48
|
+
disabled={isMutating}
|
|
49
|
+
/>
|
|
50
|
+
</View>
|
|
51
|
+
)}
|
|
52
|
+
<NavRow label="Notification settings" onPress={handleNotificationSettings} />
|
|
53
|
+
{appName !== 'services' && <NavRow label="Get help" onPress={handleGetHelp} />}
|
|
54
|
+
</View>
|
|
55
|
+
</ScrollView>
|
|
54
56
|
<View style={styles.footer}>
|
|
55
57
|
<VersionFooter />
|
|
56
58
|
</View>
|
|
@@ -90,8 +92,6 @@ const useStyles = () => {
|
|
|
90
92
|
flex: 1,
|
|
91
93
|
},
|
|
92
94
|
footer: {
|
|
93
|
-
flex: 1,
|
|
94
|
-
justifyContent: 'flex-end',
|
|
95
95
|
paddingBottom: Math.max(insets.bottom, 8),
|
|
96
96
|
},
|
|
97
97
|
sectionOuter: {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { membershipSyncInfoText } from '../membership_sync_info_text'
|
|
2
|
+
|
|
3
|
+
describe('membershipSyncInfoText', () => {
|
|
4
|
+
it('explains membership sync and history visibility for a group', () => {
|
|
5
|
+
expect(membershipSyncInfoText('the group')).toBe(
|
|
6
|
+
'This conversation will stay in sync with the group. Members will automatically be added or removed, and new members will see the history.'
|
|
7
|
+
)
|
|
8
|
+
})
|
|
9
|
+
|
|
10
|
+
it('explains membership sync and history visibility for teams', () => {
|
|
11
|
+
expect(membershipSyncInfoText('the teams')).toBe(
|
|
12
|
+
'This conversation will stay in sync with the teams. Members will automatically be added or removed, and new members will see the history.'
|
|
13
|
+
)
|
|
14
|
+
})
|
|
15
|
+
})
|
package/src/utils/index.ts
CHANGED
|
@@ -8,6 +8,7 @@ export * from './convert_attachments_for_create'
|
|
|
8
8
|
export * from './destructure_chat_group_graph_id'
|
|
9
9
|
export * from './host_bridge'
|
|
10
10
|
export * from './liquid_glass'
|
|
11
|
+
export * from './membership_sync_info_text'
|
|
11
12
|
export * from './native_adapters'
|
|
12
13
|
export * from './pluralize'
|
|
13
14
|
export * from './conversation_safety_constants'
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { LinkingAdapter } from '../linking'
|
|
2
|
+
|
|
3
|
+
describe('LinkingAdapter', () => {
|
|
4
|
+
it('forwards open options to the host', async () => {
|
|
5
|
+
const openURL = jest.fn(async () => {})
|
|
6
|
+
const adapter = new LinkingAdapter({ openURL, canOpenURL: async () => true })
|
|
7
|
+
|
|
8
|
+
await adapter.openURL('https://example.com', { forceOpenInBrowser: true })
|
|
9
|
+
|
|
10
|
+
expect(openURL).toHaveBeenCalledWith('https://example.com', { forceOpenInBrowser: true })
|
|
11
|
+
})
|
|
12
|
+
})
|
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
import { Linking } from 'react-native'
|
|
2
2
|
|
|
3
|
-
export
|
|
4
|
-
|
|
3
|
+
export type LinkingOpenURLOptions = {
|
|
4
|
+
forceOpenInBrowser?: boolean
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
type LinkingMethods = {
|
|
8
|
+
openURL: (url: string, options?: LinkingOpenURLOptions) => Promise<unknown>
|
|
5
9
|
canOpenURL: Linking['canOpenURL']
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export class LinkingAdapter {
|
|
13
|
+
openURL: LinkingMethods['openURL']
|
|
14
|
+
canOpenURL: LinkingMethods['canOpenURL']
|
|
6
15
|
|
|
7
|
-
constructor(methods:
|
|
16
|
+
constructor(methods: LinkingMethods) {
|
|
8
17
|
this.openURL = methods.openURL.bind(Linking)
|
|
9
18
|
this.canOpenURL = methods.canOpenURL.bind(Linking)
|
|
10
19
|
}
|