@planningcenter/chat-react-native 3.24.4 → 3.24.5-qa-563.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.
Files changed (101) hide show
  1. package/build/components/conversation/message.d.ts +1 -2
  2. package/build/components/conversation/message.d.ts.map +1 -1
  3. package/build/components/conversation/message.js +5 -5
  4. package/build/components/conversation/message.js.map +1 -1
  5. package/build/components/conversation/message_form.d.ts.map +1 -1
  6. package/build/components/conversation/message_form.js +1 -4
  7. package/build/components/conversation/message_form.js.map +1 -1
  8. package/build/components/conversation/messages_disabled_banners.d.ts.map +1 -1
  9. package/build/components/conversation/messages_disabled_banners.js +2 -14
  10. package/build/components/conversation/messages_disabled_banners.js.map +1 -1
  11. package/build/components/conversations/conversation_actions.js +3 -3
  12. package/build/components/conversations/conversation_actions.js.map +1 -1
  13. package/build/components/conversations/conversations.d.ts.map +1 -1
  14. package/build/components/conversations/conversations.js +1 -0
  15. package/build/components/conversations/conversations.js.map +1 -1
  16. package/build/hooks/use_conversation.d.ts.map +1 -1
  17. package/build/hooks/use_conversation.js +13 -1
  18. package/build/hooks/use_conversation.js.map +1 -1
  19. package/build/hooks/use_conversation_membership.d.ts +5 -0
  20. package/build/hooks/use_conversation_membership.d.ts.map +1 -0
  21. package/build/hooks/use_conversation_membership.js +63 -0
  22. package/build/hooks/use_conversation_membership.js.map +1 -0
  23. package/build/hooks/use_conversations_actions.d.ts.map +1 -1
  24. package/build/hooks/use_conversations_actions.js +4 -0
  25. package/build/hooks/use_conversations_actions.js.map +1 -1
  26. package/build/hooks/use_features.d.ts +1 -1
  27. package/build/hooks/use_features.js +1 -1
  28. package/build/hooks/use_features.js.map +1 -1
  29. package/build/navigation/index.d.ts +10 -0
  30. package/build/navigation/index.d.ts.map +1 -1
  31. package/build/navigation/index.js +12 -2
  32. package/build/navigation/index.js.map +1 -1
  33. package/build/screens/conversation_details_screen.d.ts.map +1 -1
  34. package/build/screens/conversation_details_screen.js +51 -19
  35. package/build/screens/conversation_details_screen.js.map +1 -1
  36. package/build/screens/conversation_notification_level_select_screen.d.ts +8 -0
  37. package/build/screens/conversation_notification_level_select_screen.d.ts.map +1 -0
  38. package/build/screens/conversation_notification_level_select_screen.js +49 -0
  39. package/build/screens/conversation_notification_level_select_screen.js.map +1 -0
  40. package/build/screens/conversation_screen.d.ts +4 -3
  41. package/build/screens/conversation_screen.d.ts.map +1 -1
  42. package/build/screens/conversation_screen.js +20 -14
  43. package/build/screens/conversation_screen.js.map +1 -1
  44. package/build/screens/group_notification_level_select_screen.d.ts +8 -0
  45. package/build/screens/group_notification_level_select_screen.d.ts.map +1 -0
  46. package/build/screens/group_notification_level_select_screen.js +40 -0
  47. package/build/screens/group_notification_level_select_screen.js.map +1 -0
  48. package/build/screens/group_notification_settings_screen.d.ts.map +1 -1
  49. package/build/screens/group_notification_settings_screen.js +30 -17
  50. package/build/screens/group_notification_settings_screen.js.map +1 -1
  51. package/build/screens/message_actions_screen.js +1 -2
  52. package/build/screens/message_actions_screen.js.map +1 -1
  53. package/build/screens/notification_settings/hooks/groups.d.ts +6 -5
  54. package/build/screens/notification_settings/hooks/groups.d.ts.map +1 -1
  55. package/build/screens/notification_settings/hooks/groups.js +63 -36
  56. package/build/screens/notification_settings/hooks/groups.js.map +1 -1
  57. package/build/screens/notification_settings_screen.d.ts.map +1 -1
  58. package/build/screens/notification_settings_screen.js +25 -11
  59. package/build/screens/notification_settings_screen.js.map +1 -1
  60. package/build/types/resources/conversation.d.ts +2 -3
  61. package/build/types/resources/conversation.d.ts.map +1 -1
  62. package/build/types/resources/conversation.js.map +1 -1
  63. package/build/types/resources/conversation_membership.d.ts +16 -0
  64. package/build/types/resources/conversation_membership.d.ts.map +1 -0
  65. package/build/types/resources/conversation_membership.js +2 -0
  66. package/build/types/resources/conversation_membership.js.map +1 -0
  67. package/build/types/resources/group_membership.d.ts +7 -0
  68. package/build/types/resources/group_membership.d.ts.map +1 -1
  69. package/build/types/resources/group_membership.js.map +1 -1
  70. package/build/types/resources/index.d.ts +1 -0
  71. package/build/types/resources/index.d.ts.map +1 -1
  72. package/build/types/resources/index.js +1 -0
  73. package/build/types/resources/index.js.map +1 -1
  74. package/build/utils/deep_snake_case_keys.d.ts +4 -0
  75. package/build/utils/deep_snake_case_keys.d.ts.map +1 -0
  76. package/build/utils/deep_snake_case_keys.js +13 -0
  77. package/build/utils/deep_snake_case_keys.js.map +1 -0
  78. package/package.json +2 -2
  79. package/src/components/conversation/message.tsx +4 -9
  80. package/src/components/conversation/message_form.tsx +1 -4
  81. package/src/components/conversation/messages_disabled_banners.tsx +9 -17
  82. package/src/components/conversations/conversation_actions.tsx +3 -3
  83. package/src/components/conversations/conversations.tsx +1 -0
  84. package/src/hooks/use_conversation.ts +13 -1
  85. package/src/hooks/use_conversation_membership.ts +91 -0
  86. package/src/hooks/use_conversations_actions.ts +4 -0
  87. package/src/hooks/use_features.ts +1 -1
  88. package/src/navigation/index.tsx +19 -1
  89. package/src/screens/conversation_details_screen.tsx +88 -25
  90. package/src/screens/conversation_notification_level_select_screen.tsx +73 -0
  91. package/src/screens/conversation_screen.tsx +20 -17
  92. package/src/screens/group_notification_level_select_screen.tsx +62 -0
  93. package/src/screens/group_notification_settings_screen.tsx +53 -18
  94. package/src/screens/message_actions_screen.tsx +1 -2
  95. package/src/screens/notification_settings/hooks/groups.ts +76 -37
  96. package/src/screens/notification_settings_screen.tsx +24 -21
  97. package/src/types/resources/conversation.ts +2 -3
  98. package/src/types/resources/conversation_membership.ts +17 -0
  99. package/src/types/resources/group_membership.ts +7 -0
  100. package/src/types/resources/index.ts +1 -0
  101. package/src/utils/deep_snake_case_keys.ts +16 -0
@@ -1,15 +1,14 @@
1
+ import { HeaderTitle as ElementsHeaderTitle, PlatformPressable, } from '@react-navigation/elements';
1
2
  import { StackActions, useNavigation } from '@react-navigation/native';
2
- import React, { useCallback, useEffect, useState, useRef, } from 'react';
3
- import { FlatList, StyleSheet, TextInput, View, Pressable, Alert, Platform, } from 'react-native';
4
- import { HeaderTitle as ElementsHeaderTitle } from '@react-navigation/elements';
3
+ import React, { useCallback, useEffect, useRef, useState, } from 'react';
4
+ import { Alert, FlatList, Platform, Pressable, StyleSheet, TextInput, View, } from 'react-native';
5
5
  import { Badge, ChildNotice, Heading, Icon, Person, Switch, Text, TextButton, } from '../components';
6
+ import { HeaderTextButton } from '../components/display/platform_modal_header_buttons';
6
7
  import { useSuspensePaginator, useTheme } from '../hooks';
7
8
  import { useConversation, useConversationDelete, useConversationDisableReplies, useConversationMute, useConversationUpdate, } from '../hooks/use_conversation';
9
+ import { availableFeatures, useFeatures } from '../hooks/use_features';
8
10
  import { isDefined } from '../types';
9
- import { HeaderTextButton } from '../components/display/platform_modal_header_buttons';
10
11
  import { tokens } from '../vendor/tapestry/tokens';
11
- import { useFeatures } from '../hooks/use_features';
12
- import { availableFeatures } from '../hooks/use_features';
13
12
  // =========================================
14
13
  // ====== Factory Constants & Types ========
15
14
  // =========================================
@@ -19,22 +18,25 @@ var SectionTypes;
19
18
  SectionTypes[SectionTypes["hidden"] = 1] = "hidden";
20
19
  SectionTypes[SectionTypes["members"] = 2] = "members";
21
20
  SectionTypes[SectionTypes["loadingMembers"] = 3] = "loadingMembers";
22
- SectionTypes[SectionTypes["setting"] = 4] = "setting";
23
- SectionTypes[SectionTypes["view"] = 5] = "view";
21
+ SectionTypes[SectionTypes["navigableSetting"] = 4] = "navigableSetting";
22
+ SectionTypes[SectionTypes["setting"] = 5] = "setting";
23
+ SectionTypes[SectionTypes["view"] = 6] = "view";
24
24
  })(SectionTypes || (SectionTypes = {}));
25
25
  export function ConversationDetailsScreen({ route }) {
26
26
  const navigation = useNavigation();
27
27
  const styles = useStyles();
28
28
  const { data: conversation } = useConversation(route.params);
29
29
  const [title, setTitle] = useState(conversation.title);
30
- const { muted, setMuted } = useConversationMute(route.params);
30
+ const { conversation_id } = route.params;
31
31
  const { repliesDisabled, setRepliesDisabled } = useConversationDisableReplies(route.params);
32
32
  const { mutate: saveTitle } = useConversationUpdate(route.params);
33
33
  const { mutate: deleteConversation } = useConversationDelete(route.params);
34
34
  const { featureEnabled } = useFeatures();
35
- const repliesEnabled = featureEnabled(availableFeatures.threaded_replies);
35
+ const granularNotificationsEnabled = featureEnabled(availableFeatures.granular_notifications_ui);
36
+ const { muted, setMuted } = useConversationMute({ conversation_id });
36
37
  const trimmedTitle = title.trim();
37
38
  const emptyTitle = trimmedTitle === '' || title === null;
39
+ const notificationLevelDescription = conversation?.conversationMembership?.notificationLevelDescription;
38
40
  const canUpdate = conversation.memberAbility?.canUpdate || false;
39
41
  const canDelete = conversation.memberAbility?.canDelete || false;
40
42
  const isLeader = conversation.memberAbility?.leader || false;
@@ -131,19 +133,28 @@ export function ConversationDetailsScreen({ route }) {
131
133
  showBottomBorder: true,
132
134
  sectionInnerStyle: styles.sectionInnerHeaderWithBottomBorder,
133
135
  },
134
- {
135
- type: SectionTypes.setting,
136
- data: {
137
- title: 'Mute',
138
- rightItem: <Switch value={muted} onChange={() => setMuted(!muted)}/>,
136
+ granularNotificationsEnabled
137
+ ? {
138
+ type: SectionTypes.navigableSetting,
139
+ data: {
140
+ title: 'Notifications',
141
+ subtitle: notificationLevelDescription,
142
+ onPress: () => navigation.navigate('ConversationNotificationLevelSelect', { conversation_id }),
143
+ },
144
+ showBottomBorder: true,
145
+ }
146
+ : {
147
+ type: SectionTypes.setting,
148
+ data: {
149
+ title: 'Mute',
150
+ rightItem: <Switch value={muted} onValueChange={value => setMuted(value)}/>,
151
+ },
152
+ showBottomBorder: true,
139
153
  },
140
- showBottomBorder: true,
141
- },
142
154
  {
143
155
  type: canUpdate ? SectionTypes.setting : SectionTypes.hidden,
144
156
  data: {
145
- title: repliesEnabled ? 'Leader messages only' : 'Freeze conversation',
146
- subtitle: repliesEnabled ? undefined : 'Disables replies for everyone except leaders.',
157
+ title: 'Only leaders can message',
147
158
  rightItem: (<Switch value={repliesDisabled} onChange={() => setRepliesDisabled(!repliesDisabled)}/>),
148
159
  },
149
160
  showBottomBorder: true,
@@ -205,6 +216,10 @@ export function ConversationDetailsScreen({ route }) {
205
216
  return (<ListSection isStart={isStart} isEnd={isEnd} showBottomBorder={item?.showBottomBorder} outerStyle={item?.sectionOuterStyle} innerStyle={item?.sectionInnerStyle}>
206
217
  <Text>Loading more...</Text>
207
218
  </ListSection>);
219
+ case SectionTypes.navigableSetting:
220
+ return (<ListSection isStart={isStart} isEnd={isEnd} showBottomBorder={item?.showBottomBorder} outerStyle={item?.sectionOuterStyle} innerStyle={item?.sectionInnerStyle}>
221
+ <NavigableSettingRow {...item.data}/>
222
+ </ListSection>);
208
223
  case SectionTypes.setting:
209
224
  return (<ListSection isStart={isStart} isEnd={isEnd} showBottomBorder={item?.showBottomBorder} outerStyle={item?.sectionOuterStyle} innerStyle={item?.sectionInnerStyle}>
210
225
  <SettingRow {...item.data}/>
@@ -267,6 +282,20 @@ function SettingRow({ title, style, titleStyle = {}, buttonTextStyle = {}, subti
267
282
  {Boolean(rightItem) && <View style={rightItemStyle}>{rightItem}</View>}
268
283
  </View>);
269
284
  }
285
+ function NavigableSettingRow({ title, subtitle, onPress }) {
286
+ const styles = useStyles();
287
+ return (<PlatformPressable onPress={onPress} accessibilityRole="button">
288
+ <View style={styles.settingRow}>
289
+ <View style={styles.settingRowContent}>
290
+ <Text variant="plain" style={styles.settingRowText}>
291
+ {title}
292
+ </Text>
293
+ {Boolean(subtitle) && <Text variant="footnote">{subtitle}</Text>}
294
+ </View>
295
+ {Platform.OS === 'ios' && (<Icon name="general.rightChevron" size={16} style={styles.navigableSettingChevron} accessibilityElementsHidden/>)}
296
+ </View>
297
+ </PlatformPressable>);
298
+ }
270
299
  function TeamsGroup({ teams }) {
271
300
  const styles = useStyles();
272
301
  if (teams.length === 0)
@@ -377,6 +406,9 @@ const useStyles = ({ isStart, isEnd } = {}) => {
377
406
  settingRowText: {
378
407
  lineHeight: 20,
379
408
  },
409
+ navigableSettingChevron: {
410
+ color: colors.iconColorDefaultDisabled,
411
+ },
380
412
  teamGroup: {
381
413
  flexDirection: 'row',
382
414
  gap: 4,
@@ -1 +1 @@
1
- {"version":3,"file":"conversation_details_screen.js","sourceRoot":"","sources":["../../src/screens/conversation_details_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAqB,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACzF,OAAO,KAAK,EAAE,EACZ,WAAW,EACX,SAAS,EACT,QAAQ,EAIR,MAAM,GACP,MAAM,OAAO,CAAA;AACd,OAAO,EACL,QAAQ,EACR,UAAU,EACV,SAAS,EACT,IAAI,EAGJ,SAAS,EACT,KAAK,EACL,QAAQ,GACT,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,WAAW,IAAI,mBAAmB,EAAoB,MAAM,4BAA4B,CAAA;AACjG,OAAO,EACL,KAAK,EACL,WAAW,EACX,OAAO,EACP,IAAI,EACJ,MAAM,EACN,MAAM,EACN,IAAI,EACJ,UAAU,GAEX,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACzD,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,6BAA6B,EAC7B,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAkB,SAAS,EAAE,MAAM,UAAU,CAAA;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qDAAqD,CAAA;AACtF,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AAGlD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AAEzD,4CAA4C;AAC5C,4CAA4C;AAC5C,4CAA4C;AAE5C,IAAK,YAOJ;AAPD,WAAK,YAAY;IACf,mDAAM,CAAA;IACN,mDAAM,CAAA;IACN,qDAAO,CAAA;IACP,mEAAc,CAAA;IACd,qDAAO,CAAA;IACP,+CAAI,CAAA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AY,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;SAC1E;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { StackActions, StaticScreenProps, useNavigation } from '@react-navigation/native'\nimport React, {\n useCallback,\n useEffect,\n useState,\n type SetStateAction,\n type Dispatch,\n type ReactNode,\n useRef,\n} from 'react'\nimport {\n FlatList,\n StyleSheet,\n TextInput,\n View,\n type ViewStyle,\n type ViewProps,\n Pressable,\n Alert,\n Platform,\n} from 'react-native'\nimport { HeaderTitle as ElementsHeaderTitle, HeaderTitleProps } from '@react-navigation/elements'\nimport {\n Badge,\n ChildNotice,\n Heading,\n Icon,\n Person,\n Switch,\n Text,\n TextButton,\n type TextStyle,\n} from '../components'\nimport { useSuspensePaginator, useTheme } from '../hooks'\nimport {\n useConversation,\n useConversationDelete,\n useConversationDisableReplies,\n useConversationMute,\n useConversationUpdate,\n} from '../hooks/use_conversation'\nimport { MemberResource, isDefined } from '../types'\nimport { HeaderTextButton } from '../components/display/platform_modal_header_buttons'\nimport { tokens } from '../vendor/tapestry/tokens'\nimport { ButtonAppearanceUnion } from '../components/display/utils/button_colors'\nimport { GroupResource } from '../types/resources/group_resource'\nimport { useFeatures } from '../hooks/use_features'\nimport { availableFeatures } from '../hooks/use_features'\n\n// =========================================\n// ====== Factory Constants & Types ========\n// =========================================\n\nenum SectionTypes {\n header,\n hidden,\n members,\n loadingMembers,\n setting,\n view,\n}\n\ntype SectionListData = Array<\n | DataItem<{ title: string }, SectionTypes.header>\n | DataItem<MemberResource, SectionTypes.members>\n | DataItem<any, SectionTypes.loadingMembers>\n | DataItem<ViewProps, SectionTypes.view>\n | DataItem<SettingRowProps, SectionTypes.setting>\n | DataItem<any, SectionTypes.hidden>\n>\n\ninterface DataItem<T, TName extends SectionTypes> {\n type: TName\n data: T\n sectionOuterStyle?: ViewStyle\n sectionInnerStyle?: ViewStyle\n showBottomBorder?: boolean\n}\n\n// =================================\n// ====== Components ===============\n// =================================\n\nexport type ConversationDetailsScreenProps = StaticScreenProps<{\n conversation_id: number\n}>\n\nexport function ConversationDetailsScreen({ route }: ConversationDetailsScreenProps) {\n const navigation = useNavigation()\n const styles = useStyles()\n\n const { data: conversation } = useConversation(route.params)\n const [title, setTitle] = useState(conversation.title)\n const { muted, setMuted } = useConversationMute(route.params)\n const { repliesDisabled, setRepliesDisabled } = useConversationDisableReplies(route.params)\n const { mutate: saveTitle } = useConversationUpdate(route.params)\n const { mutate: deleteConversation } = useConversationDelete(route.params)\n const { featureEnabled } = useFeatures()\n const repliesEnabled = featureEnabled(availableFeatures.threaded_replies)\n\n const trimmedTitle = title.trim()\n const emptyTitle = trimmedTitle === '' || title === null\n\n const canUpdate = conversation.memberAbility?.canUpdate || false\n const canDelete = conversation.memberAbility?.canDelete || false\n const isLeader = conversation.memberAbility?.leader || false\n\n const {\n data: members,\n fetchNextPage: fetchNextPageOfMembers,\n isFetchingNextPage: isLoadingMembers,\n } = useSuspensePaginator<MemberResource>({\n url: `/me/conversations/${route.params.conversation_id}/members`,\n data: {\n include: ['person'],\n fields: {\n Member: ['avatar', 'name', 'first_name', 'last_name', 'child', 'badges'],\n },\n },\n })\n\n const memberSectionStyleMap = {\n first: styles.sectionInnerFirstMember,\n middle: styles.sectionInnerMiddleMiddle,\n last: styles.sectionInnerLastMember,\n }\n\n const memberItems = members.map((data, index) => {\n const isFirst = index === 0\n const isLast = index === members.length - 1\n const memberPosition = isFirst ? 'first' : isLast ? 'last' : 'middle'\n const memberSectionStyle = memberSectionStyleMap[memberPosition]\n\n return {\n type: data.child ? SectionTypes.hidden : SectionTypes.members,\n data,\n sectionInnerStyle: memberSectionStyle,\n }\n })\n\n const loadingMemberItems = isLoadingMembers\n ? [\n {\n type: SectionTypes.loadingMembers,\n data: {},\n sectionInnerStyle: styles.sectionInnerFirstMember,\n },\n ]\n : []\n\n const childMembers = members.filter(member => member.child)\n const hasChildren = childMembers.length > 0\n\n const teamsGroup =\n conversation.groups\n ?.filter(g => g.sourceAppName === 'Services')\n ?.filter(g => ['Team', 'PlanTeam'].includes(g.sourceType))\n ?.filter(g => g.name !== null) || []\n const hasTeams = teamsGroup.length > 0\n\n const badge = conversation.badges?.[0]\n const resourceType = badge?.pcoResourceType || ''\n const productName = badge?.appName\n const name = badge?.text || undefined\n\n const handleDelete = useCallback(() => {\n Alert.alert(\n 'Delete conversation',\n `All messages in ${title} will be deleted for everyone. This action cannot be undone.`,\n [\n {\n text: 'Cancel',\n style: 'cancel',\n },\n {\n text: 'Delete',\n style: 'destructive',\n onPress: () => {\n deleteConversation()\n navigation.dispatch(StackActions.popToTop())\n },\n },\n ]\n )\n }, [deleteConversation, navigation, title])\n\n const HeaderTitle = useCallback(\n (props: HeaderTitleProps) => {\n return (\n <View style={styles.headerTitleContainer}>\n <ElementsHeaderTitle maxFontSizeMultiplier={1} {...props} />\n <Badge\n variant=\"metaSubtle\"\n label={resourceType}\n metaLabel={name}\n style={styles.headerTitleBadge}\n productLogoName={productName}\n maxFontSizeMultiplier={1}\n />\n </View>\n )\n },\n [name, productName, resourceType, styles.headerTitleBadge, styles.headerTitleContainer]\n )\n\n const HeaderRight = useCallback(() => {\n return (\n <HeaderTextButton\n onPress={() => {\n saveTitle({ title: trimmedTitle || conversation.title })\n navigation.goBack()\n }}\n title=\"Done\"\n />\n )\n }, [conversation.title, navigation, saveTitle, trimmedTitle])\n\n useEffect(() => {\n navigation.setOptions({\n headerRight: HeaderRight,\n headerTitle: HeaderTitle,\n })\n }, [HeaderRight, HeaderTitle, navigation])\n\n const listData = [\n {\n type: SectionTypes.view,\n data: {\n children: (\n <TitleInput\n canUpdate={canUpdate}\n title={title}\n setTitle={setTitle}\n isEmpty={emptyTitle}\n />\n ),\n },\n sectionInnerStyle: styles.sectionInnerTitleInput,\n },\n {\n type: SectionTypes.header,\n data: { title: 'Settings' },\n showBottomBorder: true,\n sectionInnerStyle: styles.sectionInnerHeaderWithBottomBorder,\n },\n {\n type: SectionTypes.setting,\n data: {\n title: 'Mute',\n rightItem: <Switch value={muted} onChange={() => setMuted(!muted)} />,\n },\n showBottomBorder: true,\n },\n {\n type: canUpdate ? SectionTypes.setting : SectionTypes.hidden,\n data: {\n title: repliesEnabled ? 'Leader messages only' : 'Freeze conversation',\n subtitle: repliesEnabled ? undefined : 'Disables replies for everyone except leaders.',\n rightItem: (\n <Switch value={repliesDisabled} onChange={() => setRepliesDisabled(!repliesDisabled)} />\n ),\n },\n showBottomBorder: true,\n },\n {\n type: canDelete ? SectionTypes.setting : SectionTypes.hidden,\n data: {\n title: 'Delete conversation…',\n buttonTextStyle: styles.deleteButtonText,\n appearance: 'danger',\n onPress: handleDelete,\n },\n },\n {\n type: hasTeams ? SectionTypes.header : SectionTypes.hidden,\n data: { title: 'Teams' },\n sectionInnerStyle: styles.sectionInnerHeader,\n },\n {\n type: hasTeams ? SectionTypes.view : SectionTypes.hidden,\n data: {\n children: <TeamsGroup teams={teamsGroup} />,\n },\n },\n {\n type: SectionTypes.header,\n data: { title: 'People' },\n sectionInnerStyle: styles.sectionInnerHeader,\n },\n {\n type: hasChildren && isLeader ? SectionTypes.view : SectionTypes.hidden,\n data: {\n children: <ChildNotice childMembers={childMembers} />,\n },\n sectionInnerStyle: styles.sectionInnerChildNotice,\n },\n ...memberItems,\n ...loadingMemberItems,\n ].filter(item => item.type !== SectionTypes.hidden)\n\n const headerIndices = listData\n .map(({ type }, index) => (type === SectionTypes.header ? index : undefined))\n .filter(isDefined)\n\n return (\n <View style={styles.listContainer}>\n <FlatList\n data={listData as SectionListData}\n contentContainerStyle={styles.contentContainer}\n renderItem={({ item, index }) => {\n const [isStart, isEnd] = [\n index === 0 || headerIndices.includes(index),\n index === listData.length - 1 || headerIndices.includes(index + 1),\n ]\n\n switch (item.type) {\n case SectionTypes.header:\n return (\n <ListSection\n isStart={isStart}\n isEnd={isEnd}\n showBottomBorder={item?.showBottomBorder}\n outerStyle={item?.sectionOuterStyle}\n innerStyle={item?.sectionInnerStyle}\n >\n <Heading variant=\"h3\">{item.data.title}</Heading>\n </ListSection>\n )\n case SectionTypes.members:\n return (\n <ListSection\n isStart={isStart}\n isEnd={isEnd}\n showBottomBorder={item?.showBottomBorder}\n outerStyle={item?.sectionOuterStyle}\n innerStyle={item?.sectionInnerStyle}\n >\n <Person person={{ ...item.data }} />\n </ListSection>\n )\n case SectionTypes.loadingMembers:\n return (\n <ListSection\n isStart={isStart}\n isEnd={isEnd}\n showBottomBorder={item?.showBottomBorder}\n outerStyle={item?.sectionOuterStyle}\n innerStyle={item?.sectionInnerStyle}\n >\n <Text>Loading more...</Text>\n </ListSection>\n )\n case SectionTypes.setting:\n return (\n <ListSection\n isStart={isStart}\n isEnd={isEnd}\n showBottomBorder={item?.showBottomBorder}\n outerStyle={item?.sectionOuterStyle}\n innerStyle={item?.sectionInnerStyle}\n >\n <SettingRow {...item.data} />\n </ListSection>\n )\n case SectionTypes.view:\n return (\n <ListSection\n isStart={isStart}\n isEnd={isEnd}\n showBottomBorder={item?.showBottomBorder}\n outerStyle={item?.sectionOuterStyle}\n innerStyle={item?.sectionInnerStyle}\n >\n <View {...item.data} style={item.data.style} />\n </ListSection>\n )\n default:\n return null\n }\n }}\n onEndReached={() => fetchNextPageOfMembers()}\n />\n </View>\n )\n}\n\ninterface ListSectionProps {\n isStart?: boolean\n isEnd?: boolean\n showBottomBorder?: boolean\n outerStyle?: ViewStyle\n innerStyle?: ViewStyle\n children: ReactNode\n}\n\nfunction ListSection({\n isStart,\n isEnd,\n showBottomBorder,\n outerStyle,\n innerStyle,\n children,\n}: ListSectionProps) {\n const styles = useStyles({ isStart, isEnd })\n const bottomBorder = showBottomBorder ? styles.sectionInnerBottomBorder : {}\n\n return (\n <View style={[styles.sectionOuterBase, outerStyle]}>\n <View style={[styles.sectionInnerBase, bottomBorder, innerStyle]}>{children}</View>\n </View>\n )\n}\n\ninterface InputProps {\n canUpdate: boolean\n title: string\n setTitle: Dispatch<SetStateAction<string>>\n style?: ViewStyle\n isEmpty: boolean\n}\n\nfunction TitleInput({ canUpdate, title, setTitle, style, isEmpty }: InputProps) {\n const styles = useStyles()\n const textRef = useRef<TextInput>(null)\n\n const handleFocus = () => {\n if (textRef.current) {\n textRef.current.focus()\n }\n }\n\n return (\n <Pressable style={[styles.titleContainer, style]} onPress={() => handleFocus()}>\n <View style={styles.titleLabelContainer}>\n <Text variant=\"tertiary\" style={styles.titleLabel}>\n Title\n </Text>\n {!canUpdate && <Icon name=\"general.lock\" style={styles.titleDisabledIcon} />}\n </View>\n <TextInput\n ref={textRef}\n editable={canUpdate}\n onChangeText={setTitle}\n style={[styles.titleInput, !canUpdate && styles.titleInputDisabled]}\n value={title}\n multiline\n maxLength={255} // Matches Chat Web\n enterKeyHint=\"done\"\n submitBehavior=\"blurAndSubmit\"\n />\n {isEmpty && (\n <View style={styles.inputValidationContainer}>\n <Text variant=\"footnote\" style={styles.inputValidationText}>\n A title is required for your conversation.\n </Text>\n </View>\n )}\n </Pressable>\n )\n}\n\ninterface SettingRowProps {\n title: string\n style?: ViewStyle\n rightItem?: ReactNode\n titleStyle?: TextStyle\n buttonTextStyle?: TextStyle\n subtitle?: string\n rightItemStyle?: ViewStyle\n appearance?: ButtonAppearanceUnion\n onPress?: () => void\n}\n\nfunction SettingRow({\n title,\n style,\n titleStyle = {},\n buttonTextStyle = {},\n subtitle,\n rightItem,\n rightItemStyle = {},\n appearance,\n onPress,\n}: SettingRowProps) {\n const styles = useStyles()\n\n if (onPress) {\n return (\n <TextButton\n style={[styles.settingRow, style]}\n textStyle={buttonTextStyle}\n appearance={appearance}\n onPress={onPress}\n >\n {title}\n </TextButton>\n )\n }\n\n return (\n <View style={[styles.settingRow, style]}>\n <View style={styles.settingRowContent}>\n <Text variant=\"plain\" style={[styles.settingRowText, titleStyle]}>\n {title}\n </Text>\n {Boolean(subtitle) && <Text variant=\"footnote\">{subtitle}</Text>}\n </View>\n {Boolean(rightItem) && <View style={rightItemStyle}>{rightItem}</View>}\n </View>\n )\n}\n\nfunction TeamsGroup({ teams }: { teams: GroupResource[] }) {\n const styles = useStyles()\n\n if (teams.length === 0) return null\n\n return (\n <View style={styles.teamGroup}>\n {teams.map((team, index) => (\n <Badge key={index} label={team.name as string} />\n ))}\n </View>\n )\n}\n\n// =================================\n// ====== Styles ===================\n// =================================\n\nconst useStyles = ({ isStart, isEnd }: { isStart?: boolean; isEnd?: boolean } = {}) => {\n const { colors } = useTheme()\n const headerBottomPadding = 4\n const sectionBorderRadius = 8\n\n return StyleSheet.create({\n listContainer: {\n flex: 1,\n backgroundColor: colors.surfaceColor080,\n },\n contentContainer: {\n padding: 16,\n },\n sectionOuterBase: {\n paddingLeft: 16,\n backgroundColor: colors.surfaceColor100,\n borderTopLeftRadius: isStart ? sectionBorderRadius : 0,\n borderTopRightRadius: isStart ? sectionBorderRadius : 0,\n borderBottomLeftRadius: isEnd ? sectionBorderRadius : 0,\n borderBottomRightRadius: isEnd ? sectionBorderRadius : 0,\n marginBottom: isEnd ? 16 : 0,\n },\n sectionInnerBase: {\n paddingRight: 16,\n paddingTop: isStart ? 16 : 12,\n paddingBottom: isEnd ? 16 : 12,\n },\n sectionInnerHeader: {\n paddingBottom: headerBottomPadding,\n },\n sectionInnerHeaderWithBottomBorder: {\n paddingBottom: 16,\n },\n sectionInnerBottomBorder: {\n borderBottomColor: colors.borderColorDefaultBase,\n borderBottomWidth: isEnd ? 0 : 1,\n },\n sectionInnerTitleInput: {\n paddingTop: 12, // paddingVertical doesn't override the sectionInner padding\n paddingBottom: 12,\n },\n sectionInnerChildNotice: {\n paddingBottom: headerBottomPadding,\n },\n sectionInnerMiddleMiddle: {\n paddingTop: 0,\n paddingBottom: 12,\n },\n sectionInnerFirstMember: {\n paddingTop: 12,\n paddingBottom: 12,\n },\n sectionInnerLastMember: {\n paddingTop: 0,\n paddingBottom: 16,\n },\n titleContainer: {\n gap: 4,\n },\n titleLabelContainer: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 4,\n },\n titleLabel: {\n color: colors.textColorDefaultSecondary,\n },\n titleDisabledIcon: {\n color: colors.iconColorDefaultSecondary,\n },\n titleInput: {\n color: colors.textColorDefaultPrimary,\n fontSize: tokens.fontSizeMd,\n },\n titleInputDisabled: {\n color: colors.textColorDefaultSecondary,\n },\n inputValidationContainer: {\n paddingTop: 8,\n borderTopWidth: 1,\n borderColor: colors.statusErrorBorder,\n },\n inputValidationText: {\n color: colors.statusErrorText,\n },\n settingRow: {\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n gap: 8,\n },\n settingRowContent: {\n flex: 1,\n },\n deleteButtonText: {\n fontWeight: 'normal',\n },\n settingRowText: {\n lineHeight: 20,\n },\n teamGroup: {\n flexDirection: 'row',\n gap: 4,\n flexWrap: 'wrap',\n },\n headerTitleBadge: {\n alignSelf: Platform.select({ android: 'flex-start', default: 'center' }),\n marginTop: 2,\n },\n headerTitleContainer: {\n alignItems: Platform.select({ android: 'flex-start', default: 'center' }),\n },\n })\n}\n"]}
1
+ {"version":3,"file":"conversation_details_screen.js","sourceRoot":"","sources":["../../src/screens/conversation_details_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,IAAI,mBAAmB,EAElC,iBAAiB,GAClB,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,YAAY,EAAqB,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACzF,OAAO,KAAK,EAAE,EACZ,WAAW,EACX,SAAS,EACT,MAAM,EACN,QAAQ,GAIT,MAAM,OAAO,CAAA;AACd,OAAO,EACL,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,UAAU,EACV,SAAS,EACT,IAAI,GAGL,MAAM,cAAc,CAAA;AACrB,OAAO,EACL,KAAK,EACL,WAAW,EACX,OAAO,EACP,IAAI,EACJ,MAAM,EACN,MAAM,EACN,IAAI,EACJ,UAAU,GAEX,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,gBAAgB,EAAE,MAAM,qDAAqD,CAAA;AAEtF,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAA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V,KAAK,EAAE,MAAM,CAAC,uBAAuB;YACrC,QAAQ,EAAE,MAAM,CAAC,UAAU;SAC5B;QACD,kBAAkB,EAAE;YAClB,KAAK,EAAE,MAAM,CAAC,yBAAyB;SACxC;QACD,wBAAwB,EAAE;YACxB,UAAU,EAAE,CAAC;YACb,cAAc,EAAE,CAAC;YACjB,WAAW,EAAE,MAAM,CAAC,iBAAiB;SACtC;QACD,mBAAmB,EAAE;YACnB,KAAK,EAAE,MAAM,CAAC,eAAe;SAC9B;QACD,UAAU,EAAE;YACV,aAAa,EAAE,KAAK;YACpB,cAAc,EAAE,eAAe;YAC/B,UAAU,EAAE,QAAQ;YACpB,GAAG,EAAE,CAAC;SACP;QACD,iBAAiB,EAAE;YACjB,IAAI,EAAE,CAAC;SACR;QACD,gBAAgB,EAAE;YAChB,UAAU,EAAE,QAAQ;SACrB;QACD,cAAc,EAAE;YACd,UAAU,EAAE,EAAE;SACf;QACD,uBAAuB,EAAE;YACvB,KAAK,EAAE,MAAM,CAAC,wBAAwB;SACvC;QACD,SAAS,EAAE;YACT,aAAa,EAAE,KAAK;YACpB,GAAG,EAAE,CAAC;YACN,QAAQ,EAAE,MAAM;SACjB;QACD,gBAAgB,EAAE;YAChB,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;YACxE,SAAS,EAAE,CAAC;SACb;QACD,oBAAoB,EAAE;YACpB,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;SAC1E;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import {\n HeaderTitle as ElementsHeaderTitle,\n HeaderTitleProps,\n PlatformPressable,\n} from '@react-navigation/elements'\nimport { StackActions, StaticScreenProps, useNavigation } from '@react-navigation/native'\nimport React, {\n useCallback,\n useEffect,\n useRef,\n useState,\n type Dispatch,\n type ReactNode,\n type SetStateAction,\n} from 'react'\nimport {\n Alert,\n FlatList,\n Platform,\n Pressable,\n StyleSheet,\n TextInput,\n View,\n type ViewProps,\n type ViewStyle,\n} from 'react-native'\nimport {\n Badge,\n ChildNotice,\n Heading,\n Icon,\n Person,\n Switch,\n Text,\n TextButton,\n type TextStyle,\n} from '../components'\nimport { HeaderTextButton } from '../components/display/platform_modal_header_buttons'\nimport { ButtonAppearanceUnion } from '../components/display/utils/button_colors'\nimport { useSuspensePaginator, useTheme } from '../hooks'\nimport {\n useConversation,\n useConversationDelete,\n useConversationDisableReplies,\n useConversationMute,\n useConversationUpdate,\n} from '../hooks/use_conversation'\n\nimport { availableFeatures, useFeatures } from '../hooks/use_features'\nimport { MemberResource, isDefined } from '../types'\nimport { GroupResource } from '../types/resources/group_resource'\nimport { tokens } from '../vendor/tapestry/tokens'\n// =========================================\n// ====== Factory Constants & Types ========\n// =========================================\n\nenum SectionTypes {\n header,\n hidden,\n members,\n loadingMembers,\n navigableSetting,\n setting,\n view,\n}\n\ntype SectionListData = Array<\n | DataItem<{ title: string }, SectionTypes.header>\n | DataItem<MemberResource, SectionTypes.members>\n | DataItem<any, SectionTypes.loadingMembers>\n | DataItem<NavigableSettingRowProps, SectionTypes.navigableSetting>\n | DataItem<ViewProps, SectionTypes.view>\n | DataItem<SettingRowProps, SectionTypes.setting>\n | DataItem<any, SectionTypes.hidden>\n>\n\ninterface DataItem<T, TName extends SectionTypes> {\n type: TName\n data: T\n sectionOuterStyle?: ViewStyle\n sectionInnerStyle?: ViewStyle\n showBottomBorder?: boolean\n}\n\n// =================================\n// ====== Components ===============\n// =================================\n\nexport type ConversationDetailsScreenProps = StaticScreenProps<{\n conversation_id: number\n}>\n\nexport function ConversationDetailsScreen({ route }: ConversationDetailsScreenProps) {\n const navigation = useNavigation()\n const styles = useStyles()\n\n const { data: conversation } = useConversation(route.params)\n const [title, setTitle] = useState(conversation.title)\n const { conversation_id } = route.params\n const { repliesDisabled, setRepliesDisabled } = useConversationDisableReplies(route.params)\n const { mutate: saveTitle } = useConversationUpdate(route.params)\n const { mutate: deleteConversation } = useConversationDelete(route.params)\n const { featureEnabled } = useFeatures()\n const granularNotificationsEnabled = featureEnabled(availableFeatures.granular_notifications_ui)\n const { muted, setMuted } = useConversationMute({ conversation_id })\n\n const trimmedTitle = title.trim()\n const emptyTitle = trimmedTitle === '' || title === null\n\n const notificationLevelDescription =\n conversation?.conversationMembership?.notificationLevelDescription\n const canUpdate = conversation.memberAbility?.canUpdate || false\n const canDelete = conversation.memberAbility?.canDelete || false\n const isLeader = conversation.memberAbility?.leader || false\n\n const {\n data: members,\n fetchNextPage: fetchNextPageOfMembers,\n isFetchingNextPage: isLoadingMembers,\n } = useSuspensePaginator<MemberResource>({\n url: `/me/conversations/${route.params.conversation_id}/members`,\n data: {\n include: ['person'],\n fields: {\n Member: ['avatar', 'name', 'first_name', 'last_name', 'child', 'badges'],\n },\n },\n })\n\n const memberSectionStyleMap = {\n first: styles.sectionInnerFirstMember,\n middle: styles.sectionInnerMiddleMiddle,\n last: styles.sectionInnerLastMember,\n }\n\n const memberItems = members.map((data, index) => {\n const isFirst = index === 0\n const isLast = index === members.length - 1\n const memberPosition = isFirst ? 'first' : isLast ? 'last' : 'middle'\n const memberSectionStyle = memberSectionStyleMap[memberPosition]\n\n return {\n type: data.child ? SectionTypes.hidden : SectionTypes.members,\n data,\n sectionInnerStyle: memberSectionStyle,\n }\n })\n\n const loadingMemberItems = isLoadingMembers\n ? [\n {\n type: SectionTypes.loadingMembers,\n data: {},\n sectionInnerStyle: styles.sectionInnerFirstMember,\n },\n ]\n : []\n\n const childMembers = members.filter(member => member.child)\n const hasChildren = childMembers.length > 0\n\n const teamsGroup =\n conversation.groups\n ?.filter(g => g.sourceAppName === 'Services')\n ?.filter(g => ['Team', 'PlanTeam'].includes(g.sourceType))\n ?.filter(g => g.name !== null) || []\n const hasTeams = teamsGroup.length > 0\n\n const badge = conversation.badges?.[0]\n const resourceType = badge?.pcoResourceType || ''\n const productName = badge?.appName\n const name = badge?.text || undefined\n\n const handleDelete = useCallback(() => {\n Alert.alert(\n 'Delete conversation',\n `All messages in ${title} will be deleted for everyone. This action cannot be undone.`,\n [\n {\n text: 'Cancel',\n style: 'cancel',\n },\n {\n text: 'Delete',\n style: 'destructive',\n onPress: () => {\n deleteConversation()\n navigation.dispatch(StackActions.popToTop())\n },\n },\n ]\n )\n }, [deleteConversation, navigation, title])\n\n const HeaderTitle = useCallback(\n (props: HeaderTitleProps) => {\n return (\n <View style={styles.headerTitleContainer}>\n <ElementsHeaderTitle maxFontSizeMultiplier={1} {...props} />\n <Badge\n variant=\"metaSubtle\"\n label={resourceType}\n metaLabel={name}\n style={styles.headerTitleBadge}\n productLogoName={productName}\n maxFontSizeMultiplier={1}\n />\n </View>\n )\n },\n [name, productName, resourceType, styles.headerTitleBadge, styles.headerTitleContainer]\n )\n\n const HeaderRight = useCallback(() => {\n return (\n <HeaderTextButton\n onPress={() => {\n saveTitle({ title: trimmedTitle || conversation.title })\n navigation.goBack()\n }}\n title=\"Done\"\n />\n )\n }, [conversation.title, navigation, saveTitle, trimmedTitle])\n\n useEffect(() => {\n navigation.setOptions({\n headerRight: HeaderRight,\n headerTitle: HeaderTitle,\n })\n }, [HeaderRight, HeaderTitle, navigation])\n\n const listData = [\n {\n type: SectionTypes.view,\n data: {\n children: (\n <TitleInput\n canUpdate={canUpdate}\n title={title}\n setTitle={setTitle}\n isEmpty={emptyTitle}\n />\n ),\n },\n sectionInnerStyle: styles.sectionInnerTitleInput,\n },\n {\n type: SectionTypes.header,\n data: { title: 'Settings' },\n showBottomBorder: true,\n sectionInnerStyle: styles.sectionInnerHeaderWithBottomBorder,\n },\n granularNotificationsEnabled\n ? {\n type: SectionTypes.navigableSetting,\n data: {\n title: 'Notifications',\n subtitle: notificationLevelDescription,\n onPress: () =>\n navigation.navigate('ConversationNotificationLevelSelect', { conversation_id }),\n },\n showBottomBorder: true,\n }\n : {\n type: SectionTypes.setting,\n data: {\n title: 'Mute',\n rightItem: <Switch value={muted} onValueChange={value => setMuted(value)} />,\n },\n showBottomBorder: true,\n },\n {\n type: canUpdate ? SectionTypes.setting : SectionTypes.hidden,\n data: {\n title: 'Only leaders can message',\n rightItem: (\n <Switch value={repliesDisabled} onChange={() => setRepliesDisabled(!repliesDisabled)} />\n ),\n },\n showBottomBorder: true,\n },\n {\n type: canDelete ? SectionTypes.setting : SectionTypes.hidden,\n data: {\n title: 'Delete conversation…',\n buttonTextStyle: styles.deleteButtonText,\n appearance: 'danger',\n onPress: handleDelete,\n },\n },\n {\n type: hasTeams ? SectionTypes.header : SectionTypes.hidden,\n data: { title: 'Teams' },\n sectionInnerStyle: styles.sectionInnerHeader,\n },\n {\n type: hasTeams ? SectionTypes.view : SectionTypes.hidden,\n data: {\n children: <TeamsGroup teams={teamsGroup} />,\n },\n },\n {\n type: SectionTypes.header,\n data: { title: 'People' },\n sectionInnerStyle: styles.sectionInnerHeader,\n },\n {\n type: hasChildren && isLeader ? SectionTypes.view : SectionTypes.hidden,\n data: {\n children: <ChildNotice childMembers={childMembers} />,\n },\n sectionInnerStyle: styles.sectionInnerChildNotice,\n },\n ...memberItems,\n ...loadingMemberItems,\n ].filter(item => item.type !== SectionTypes.hidden)\n\n const headerIndices = listData\n .map(({ type }, index) => (type === SectionTypes.header ? index : undefined))\n .filter(isDefined)\n\n return (\n <View style={styles.listContainer}>\n <FlatList\n data={listData as SectionListData}\n contentContainerStyle={styles.contentContainer}\n renderItem={({ item, index }) => {\n const [isStart, isEnd] = [\n index === 0 || headerIndices.includes(index),\n index === listData.length - 1 || headerIndices.includes(index + 1),\n ]\n\n switch (item.type) {\n case SectionTypes.header:\n return (\n <ListSection\n isStart={isStart}\n isEnd={isEnd}\n showBottomBorder={item?.showBottomBorder}\n outerStyle={item?.sectionOuterStyle}\n innerStyle={item?.sectionInnerStyle}\n >\n <Heading variant=\"h3\">{item.data.title}</Heading>\n </ListSection>\n )\n case SectionTypes.members:\n return (\n <ListSection\n isStart={isStart}\n isEnd={isEnd}\n showBottomBorder={item?.showBottomBorder}\n outerStyle={item?.sectionOuterStyle}\n innerStyle={item?.sectionInnerStyle}\n >\n <Person person={{ ...item.data }} />\n </ListSection>\n )\n case SectionTypes.loadingMembers:\n return (\n <ListSection\n isStart={isStart}\n isEnd={isEnd}\n showBottomBorder={item?.showBottomBorder}\n outerStyle={item?.sectionOuterStyle}\n innerStyle={item?.sectionInnerStyle}\n >\n <Text>Loading more...</Text>\n </ListSection>\n )\n case SectionTypes.navigableSetting:\n return (\n <ListSection\n isStart={isStart}\n isEnd={isEnd}\n showBottomBorder={item?.showBottomBorder}\n outerStyle={item?.sectionOuterStyle}\n innerStyle={item?.sectionInnerStyle}\n >\n <NavigableSettingRow {...item.data} />\n </ListSection>\n )\n case SectionTypes.setting:\n return (\n <ListSection\n isStart={isStart}\n isEnd={isEnd}\n showBottomBorder={item?.showBottomBorder}\n outerStyle={item?.sectionOuterStyle}\n innerStyle={item?.sectionInnerStyle}\n >\n <SettingRow {...item.data} />\n </ListSection>\n )\n case SectionTypes.view:\n return (\n <ListSection\n isStart={isStart}\n isEnd={isEnd}\n showBottomBorder={item?.showBottomBorder}\n outerStyle={item?.sectionOuterStyle}\n innerStyle={item?.sectionInnerStyle}\n >\n <View {...item.data} style={item.data.style} />\n </ListSection>\n )\n default:\n return null\n }\n }}\n onEndReached={() => fetchNextPageOfMembers()}\n />\n </View>\n )\n}\n\ninterface ListSectionProps {\n isStart?: boolean\n isEnd?: boolean\n showBottomBorder?: boolean\n outerStyle?: ViewStyle\n innerStyle?: ViewStyle\n children: ReactNode\n}\n\nfunction ListSection({\n isStart,\n isEnd,\n showBottomBorder,\n outerStyle,\n innerStyle,\n children,\n}: ListSectionProps) {\n const styles = useStyles({ isStart, isEnd })\n const bottomBorder = showBottomBorder ? styles.sectionInnerBottomBorder : {}\n\n return (\n <View style={[styles.sectionOuterBase, outerStyle]}>\n <View style={[styles.sectionInnerBase, bottomBorder, innerStyle]}>{children}</View>\n </View>\n )\n}\n\ninterface InputProps {\n canUpdate: boolean\n title: string\n setTitle: Dispatch<SetStateAction<string>>\n style?: ViewStyle\n isEmpty: boolean\n}\n\nfunction TitleInput({ canUpdate, title, setTitle, style, isEmpty }: InputProps) {\n const styles = useStyles()\n const textRef = useRef<TextInput>(null)\n\n const handleFocus = () => {\n if (textRef.current) {\n textRef.current.focus()\n }\n }\n\n return (\n <Pressable style={[styles.titleContainer, style]} onPress={() => handleFocus()}>\n <View style={styles.titleLabelContainer}>\n <Text variant=\"tertiary\" style={styles.titleLabel}>\n Title\n </Text>\n {!canUpdate && <Icon name=\"general.lock\" style={styles.titleDisabledIcon} />}\n </View>\n <TextInput\n ref={textRef}\n editable={canUpdate}\n onChangeText={setTitle}\n style={[styles.titleInput, !canUpdate && styles.titleInputDisabled]}\n value={title}\n multiline\n maxLength={255} // Matches Chat Web\n enterKeyHint=\"done\"\n submitBehavior=\"blurAndSubmit\"\n />\n {isEmpty && (\n <View style={styles.inputValidationContainer}>\n <Text variant=\"footnote\" style={styles.inputValidationText}>\n A title is required for your conversation.\n </Text>\n </View>\n )}\n </Pressable>\n )\n}\n\ninterface NavigableSettingRowProps {\n title: string\n subtitle?: string\n onPress: () => void\n}\n\ninterface SettingRowProps {\n title: string\n style?: ViewStyle\n rightItem?: ReactNode\n titleStyle?: TextStyle\n buttonTextStyle?: TextStyle\n subtitle?: string\n rightItemStyle?: ViewStyle\n appearance?: ButtonAppearanceUnion\n onPress?: () => void\n}\n\nfunction SettingRow({\n title,\n style,\n titleStyle = {},\n buttonTextStyle = {},\n subtitle,\n rightItem,\n rightItemStyle = {},\n appearance,\n onPress,\n}: SettingRowProps) {\n const styles = useStyles()\n\n if (onPress) {\n return (\n <TextButton\n style={[styles.settingRow, style]}\n textStyle={buttonTextStyle}\n appearance={appearance}\n onPress={onPress}\n >\n {title}\n </TextButton>\n )\n }\n\n return (\n <View style={[styles.settingRow, style]}>\n <View style={styles.settingRowContent}>\n <Text variant=\"plain\" style={[styles.settingRowText, titleStyle]}>\n {title}\n </Text>\n {Boolean(subtitle) && <Text variant=\"footnote\">{subtitle}</Text>}\n </View>\n {Boolean(rightItem) && <View style={rightItemStyle}>{rightItem}</View>}\n </View>\n )\n}\n\nfunction NavigableSettingRow({ title, subtitle, onPress }: NavigableSettingRowProps) {\n const styles = useStyles()\n return (\n <PlatformPressable onPress={onPress} accessibilityRole=\"button\">\n <View style={styles.settingRow}>\n <View style={styles.settingRowContent}>\n <Text variant=\"plain\" style={styles.settingRowText}>\n {title}\n </Text>\n {Boolean(subtitle) && <Text variant=\"footnote\">{subtitle}</Text>}\n </View>\n {Platform.OS === 'ios' && (\n <Icon\n name=\"general.rightChevron\"\n size={16}\n style={styles.navigableSettingChevron}\n accessibilityElementsHidden\n />\n )}\n </View>\n </PlatformPressable>\n )\n}\n\nfunction TeamsGroup({ teams }: { teams: GroupResource[] }) {\n const styles = useStyles()\n\n if (teams.length === 0) return null\n\n return (\n <View style={styles.teamGroup}>\n {teams.map((team, index) => (\n <Badge key={index} label={team.name as string} />\n ))}\n </View>\n )\n}\n\n// =================================\n// ====== Styles ===================\n// =================================\n\nconst useStyles = ({ isStart, isEnd }: { isStart?: boolean; isEnd?: boolean } = {}) => {\n const { colors } = useTheme()\n const headerBottomPadding = 4\n const sectionBorderRadius = 8\n\n return StyleSheet.create({\n listContainer: {\n flex: 1,\n backgroundColor: colors.surfaceColor080,\n },\n contentContainer: {\n padding: 16,\n },\n sectionOuterBase: {\n paddingLeft: 16,\n backgroundColor: colors.surfaceColor100,\n borderTopLeftRadius: isStart ? sectionBorderRadius : 0,\n borderTopRightRadius: isStart ? sectionBorderRadius : 0,\n borderBottomLeftRadius: isEnd ? sectionBorderRadius : 0,\n borderBottomRightRadius: isEnd ? sectionBorderRadius : 0,\n marginBottom: isEnd ? 16 : 0,\n },\n sectionInnerBase: {\n paddingRight: 16,\n paddingTop: isStart ? 16 : 12,\n paddingBottom: isEnd ? 16 : 12,\n },\n sectionInnerHeader: {\n paddingBottom: headerBottomPadding,\n },\n sectionInnerHeaderWithBottomBorder: {\n paddingBottom: 16,\n },\n sectionInnerBottomBorder: {\n borderBottomColor: colors.borderColorDefaultBase,\n borderBottomWidth: isEnd ? 0 : 1,\n },\n sectionInnerTitleInput: {\n paddingTop: 12, // paddingVertical doesn't override the sectionInner padding\n paddingBottom: 12,\n },\n sectionInnerChildNotice: {\n paddingBottom: headerBottomPadding,\n },\n sectionInnerMiddleMiddle: {\n paddingTop: 0,\n paddingBottom: 12,\n },\n sectionInnerFirstMember: {\n paddingTop: 12,\n paddingBottom: 12,\n },\n sectionInnerLastMember: {\n paddingTop: 0,\n paddingBottom: 16,\n },\n titleContainer: {\n gap: 4,\n },\n titleLabelContainer: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: 4,\n },\n titleLabel: {\n color: colors.textColorDefaultSecondary,\n },\n titleDisabledIcon: {\n color: colors.iconColorDefaultSecondary,\n },\n titleInput: {\n color: colors.textColorDefaultPrimary,\n fontSize: tokens.fontSizeMd,\n },\n titleInputDisabled: {\n color: colors.textColorDefaultSecondary,\n },\n inputValidationContainer: {\n paddingTop: 8,\n borderTopWidth: 1,\n borderColor: colors.statusErrorBorder,\n },\n inputValidationText: {\n color: colors.statusErrorText,\n },\n settingRow: {\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n gap: 8,\n },\n settingRowContent: {\n flex: 1,\n },\n deleteButtonText: {\n fontWeight: 'normal',\n },\n settingRowText: {\n lineHeight: 20,\n },\n navigableSettingChevron: {\n color: colors.iconColorDefaultDisabled,\n },\n teamGroup: {\n flexDirection: 'row',\n gap: 4,\n flexWrap: 'wrap',\n },\n headerTitleBadge: {\n alignSelf: Platform.select({ android: 'flex-start', default: 'center' }),\n marginTop: 2,\n },\n headerTitleContainer: {\n alignItems: Platform.select({ android: 'flex-start', default: 'center' }),\n },\n })\n}\n"]}
@@ -0,0 +1,8 @@
1
+ import { StaticScreenProps } from '@react-navigation/native';
2
+ import React from 'react';
3
+ export declare const ConversationNotificationLevelSelectScreenOptions: import("@react-navigation/native-stack").NativeStackNavigationOptions;
4
+ export type ConversationNotificationLevelSelectScreenProps = StaticScreenProps<{
5
+ conversation_id: number;
6
+ }>;
7
+ export declare function ConversationNotificationLevelSelectScreen({ route, }: ConversationNotificationLevelSelectScreenProps): React.JSX.Element;
8
+ //# sourceMappingURL=conversation_notification_level_select_screen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversation_notification_level_select_screen.d.ts","sourceRoot":"","sources":["../../src/screens/conversation_notification_level_select_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAiB,MAAM,0BAA0B,CAAA;AAC3E,OAAO,KAAK,MAAM,OAAO,CAAA;AASzB,eAAO,MAAM,gDAAgD,uEAG3D,CAAA;AAEF,MAAM,MAAM,8CAA8C,GAAG,iBAAiB,CAAC;IAC7E,eAAe,EAAE,MAAM,CAAA;CACxB,CAAC,CAAA;AAEF,wBAAgB,yCAAyC,CAAC,EACxD,KAAK,GACN,EAAE,8CAA8C,qBAwChD"}
@@ -0,0 +1,49 @@
1
+ import { useNavigation } from '@react-navigation/native';
2
+ import React from 'react';
3
+ import { StyleSheet } from 'react-native';
4
+ import FormSheet, { getFormSheetScreenOptions } from '../components/primitive/form_sheet';
5
+ import { PressableRow } from '../components';
6
+ import { useTheme } from '../hooks';
7
+ import { useConversation } from '../hooks/use_conversation';
8
+ import { useConversationMembershipUpdate } from '../hooks/use_conversation_membership';
9
+ export const ConversationNotificationLevelSelectScreenOptions = getFormSheetScreenOptions({
10
+ headerTitle: 'Notification level',
11
+ sheetAllowedDetents: [0.35],
12
+ });
13
+ export function ConversationNotificationLevelSelectScreen({ route, }) {
14
+ const { conversation_id } = route.params;
15
+ const navigation = useNavigation();
16
+ const styles = useStyles();
17
+ const { colors } = useTheme();
18
+ const { data: conversation } = useConversation({ conversation_id });
19
+ const { mutate: updateNotificationLevel } = useConversationMembershipUpdate({ conversation_id });
20
+ const notificationLevel = conversation.conversationMembership?.notificationLevel;
21
+ const notificationLevelOptions = conversation.conversationMembership?.notificationLevelOptions ?? [];
22
+ const handleSelect = (value, isActive) => {
23
+ if (!isActive) {
24
+ const muted = value === 'nothing';
25
+ updateNotificationLevel({
26
+ muted,
27
+ notificationLevel: value,
28
+ });
29
+ }
30
+ navigation.goBack();
31
+ };
32
+ return (<FormSheet.Root contentStyle={styles.content}>
33
+ {notificationLevelOptions.map(option => {
34
+ const isActive = option.enabled;
35
+ return (<PressableRow key={option.value} text={option.description} isActive={isActive} onPress={() => handleSelect(option.value, isActive)} iconColor={colors.statusSuccessIcon} style={styles.row}/>);
36
+ })}
37
+ </FormSheet.Root>);
38
+ }
39
+ const useStyles = () => {
40
+ return StyleSheet.create({
41
+ content: {
42
+ paddingTop: 20,
43
+ },
44
+ row: {
45
+ borderBottomWidth: 0,
46
+ },
47
+ });
48
+ };
49
+ //# sourceMappingURL=conversation_notification_level_select_screen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversation_notification_level_select_screen.js","sourceRoot":"","sources":["../../src/screens/conversation_notification_level_select_screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAC3E,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,SAAS,EAAE,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAA;AACzF,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAC3D,OAAO,EAAE,+BAA+B,EAAE,MAAM,sCAAsC,CAAA;AAGtF,MAAM,CAAC,MAAM,gDAAgD,GAAG,yBAAyB,CAAC;IACxF,WAAW,EAAE,oBAAoB;IACjC,mBAAmB,EAAE,CAAC,IAA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C,CACzB,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CACpD,SAAS,CAAC,CAAC,MAAM,CAAC,iBAAiB,CAAC,CACpC,KAAK,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAClB,CACH,CAAA;QACH,CAAC,CAAC,CACJ;IAAA,EAAE,SAAS,CAAC,IAAI,CAAC,CAClB,CAAA;AACH,CAAC;AAED,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,UAAU,CAAC,MAAM,CAAC;QACvB,OAAO,EAAE;YACP,UAAU,EAAE,EAAE;SACf;QACD,GAAG,EAAE;YACH,iBAAiB,EAAE,CAAC;SACrB;KACF,CAAC,CAAA;AACJ,CAAC,CAAA","sourcesContent":["import { StaticScreenProps, useNavigation } from '@react-navigation/native'\nimport React from 'react'\nimport { StyleSheet } from 'react-native'\nimport FormSheet, { getFormSheetScreenOptions } from '../components/primitive/form_sheet'\nimport { PressableRow } from '../components'\nimport { useTheme } from '../hooks'\nimport { useConversation } from '../hooks/use_conversation'\nimport { useConversationMembershipUpdate } from '../hooks/use_conversation_membership'\nimport { NotificationLevelValue } from '../types'\n\nexport const ConversationNotificationLevelSelectScreenOptions = getFormSheetScreenOptions({\n headerTitle: 'Notification level',\n sheetAllowedDetents: [0.35],\n})\n\nexport type ConversationNotificationLevelSelectScreenProps = StaticScreenProps<{\n conversation_id: number\n}>\n\nexport function ConversationNotificationLevelSelectScreen({\n route,\n}: ConversationNotificationLevelSelectScreenProps) {\n const { conversation_id } = route.params\n const navigation = useNavigation()\n const styles = useStyles()\n const { colors } = useTheme()\n const { data: conversation } = useConversation({ conversation_id })\n const { mutate: updateNotificationLevel } = useConversationMembershipUpdate({ conversation_id })\n\n const notificationLevel = conversation.conversationMembership?.notificationLevel\n const notificationLevelOptions =\n conversation.conversationMembership?.notificationLevelOptions ?? []\n\n const handleSelect = (value: NotificationLevelValue, isActive: boolean) => {\n if (!isActive) {\n const muted = value === 'nothing'\n updateNotificationLevel({\n muted,\n notificationLevel: value as typeof notificationLevel,\n })\n }\n navigation.goBack()\n }\n\n return (\n <FormSheet.Root contentStyle={styles.content}>\n {notificationLevelOptions.map(option => {\n const isActive = option.enabled\n return (\n <PressableRow\n key={option.value}\n text={option.description}\n isActive={isActive}\n onPress={() => handleSelect(option.value, isActive)}\n iconColor={colors.statusSuccessIcon}\n style={styles.row}\n />\n )\n })}\n </FormSheet.Root>\n )\n}\n\nconst useStyles = () => {\n return StyleSheet.create({\n content: {\n paddingTop: 20,\n },\n row: {\n borderBottomWidth: 0,\n },\n })\n}\n"]}
@@ -15,6 +15,7 @@ export type ConversationRouteProps = {
15
15
  subtitle?: string;
16
16
  badge?: ConversationBadgeResource;
17
17
  deleted?: boolean;
18
+ muted?: boolean;
18
19
  };
19
20
  export type ConversationScreenProps = StaticScreenProps<ConversationRouteProps>;
20
21
  export declare function ConversationScreen({ route }: ConversationScreenProps): React.JSX.Element;
@@ -33,14 +34,14 @@ type ReplyShadowMessage = {
33
34
  interface GroupMessagesProps {
34
35
  ms: MessageResource[];
35
36
  inReplyScreen?: boolean;
36
- repliesEnabled?: boolean;
37
37
  }
38
- export declare const groupMessages: ({ ms, inReplyScreen, repliesEnabled, }: GroupMessagesProps) => (MessageResource | DateSeparator | ReplyShadowMessage)[];
38
+ export declare const groupMessages: ({ ms, inReplyScreen }: GroupMessagesProps) => (MessageResource | DateSeparator | ReplyShadowMessage)[];
39
39
  interface ConversationScreenTitleProps extends HeaderTitleProps {
40
40
  conversation_id: number;
41
41
  badge?: ConversationBadgeResource;
42
42
  deleted?: boolean;
43
+ muted?: boolean;
43
44
  }
44
- export declare const ConversationScreenTitle: ({ conversation_id, badge, children, style, deleted, }: ConversationScreenTitleProps) => React.JSX.Element;
45
+ export declare const ConversationScreenTitle: ({ conversation_id, badge, children, style, deleted, muted, }: ConversationScreenTitleProps) => React.JSX.Element;
45
46
  export {};
46
47
  //# sourceMappingURL=conversation_screen.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"conversation_screen.d.ts","sourceRoot":"","sources":["../../src/screens/conversation_screen.tsx"],"names":[],"mappings":"AACA,OAAO,EAAe,gBAAgB,EAAqB,MAAM,4BAA4B,CAAA;AAC7F,OAAO,EAGL,iBAAiB,EAIlB,MAAM,0BAA0B,CAAA;AAEjC,OAAO,KAAmD,MAAM,OAAO,CAAA;AAsBvE,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAC1C,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAA;AAMjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,iDAAiD,CAAA;AAIpF,MAAM,MAAM,sBAAsB,GAAG;IACnC,eAAe,EAAE,MAAM,CAAA;IACvB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,sBAAsB,CAAC,EAAE,MAAM,CAAA;IAC/B,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAClC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,yBAAyB,CAAA;IACjC,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG,iBAAiB,CAAC,sBAAsB,CAAC,CAAA;AAE/E,wBAAgB,kBAAkB,CAAC,EAAE,KAAK,EAAE,EAAE,uBAAuB,qBAkBpE;AA8JD,MAAM,MAAM,aAAa,GAAG;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA;AAwC/E,KAAK,kBAAkB,GAAG;IACxB,IAAI,EAAE,oBAAoB,CAAA;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M,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,yBAAyB,CAAA;IACjC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG,iBAAiB,CAAC,sBAAsB,CAAC,CAAA;AAE/E,wBAAgB,kBAAkB,CAAC,EAAE,KAAK,EAAE,EAAE,uBAAuB,qBAkBpE;AA6JD,MAAM,MAAM,aAAa,GAAG;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA;AAwC/E,KAAK,kBAAkB,GAAG;IACxB,IAAI,EAAE,oBAAoB,CAAA;IAC1B,EAAE,EAAE,MAAM,CAAA;IACV,SAAS,EAAE,MAAM,CAAA;IACjB,oBAAoB,EAAE,OAAO,CAAA;IAC7B,iBAAiB,EAAE,OAAO,CAAA;CAC3B,CAAA;AAED,UAAU,kBAAkB;IAC1B,EAAE,EAAE,eAAe,EAAE,CAAA;IACrB,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB;AAED,eAAO,MAAM,aAAa,0BAA2B,kBAAkB,6DA6FtE,CAAA;AACD,UAAU,4BAA6B,SAAQ,gBAAgB;IAC7D,eAAe,EAAE,MAAM,CAAA;IACvB,KAAK,CAAC,EAAE,yBAAyB,CAAA;IACjC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,eAAO,MAAM,uBAAuB,iEAOjC,4BAA4B,sBAoC9B,CAAA"}
@@ -24,7 +24,6 @@ import { CONVERSATION_MESSAGE_LIST_PADDING_HORIZONTAL } from '../utils/styles';
24
24
  import { useConversationJoltEvents } from '../hooks/use_conversation_jolt_events';
25
25
  import { JumpToBottomButton } from '../components/conversation/jump_to_bottom_button';
26
26
  import { ReplyShadowMessage } from '../components/conversation/reply_shadow_message';
27
- import { availableFeatures, useFeatures } from '../hooks/use_features';
28
27
  import { ConversationContextProvider } from '../contexts/conversation_context';
29
28
  export function ConversationScreen({ route }) {
30
29
  const { conversation_id, reply_root_id } = route.params;
@@ -50,12 +49,9 @@ function ConversationScreenContent({ route }) {
50
49
  useConversationMessagesJoltEvents({ conversationId: conversation_id });
51
50
  useEnsureConversationsRouteExists();
52
51
  useMarkLatestMessageRead({ conversation, messages });
53
- const { featureEnabled } = useFeatures();
54
- const repliesEnabled = featureEnabled(availableFeatures.threaded_replies);
55
52
  const messagesWithSeparators = groupMessages({
56
53
  ms: messages,
57
54
  inReplyScreen: !!reply_root_id,
58
- repliesEnabled,
59
55
  });
60
56
  const noMessages = messagesWithSeparators.length === 0;
61
57
  const { repliesDisabled, memberAbility, badges, title } = conversation;
@@ -67,6 +63,8 @@ function ConversationScreenContent({ route }) {
67
63
  const replyHeaderTitle = replyRootAuthorFirstName
68
64
  ? `Reply to ${replyRootAuthorFirstName}`
69
65
  : 'Reply';
66
+ // Prefer the membership for optimistic updates.
67
+ const muted = conversation.conversationMembership?.muted ?? conversation.muted;
70
68
  const listRef = useRef(null);
71
69
  const [showJumpToBottomButton, setShowJumpToBottomButton] = useState(false);
72
70
  const trackScroll = (event) => {
@@ -89,9 +87,10 @@ function ConversationScreenContent({ route }) {
89
87
  title: title,
90
88
  badge: badges?.[0],
91
89
  deleted: conversation?.deleted,
90
+ muted,
92
91
  });
93
92
  }
94
- }, [navigation, title, badges, conversation?.deleted, reply_root_id, replyHeaderTitle]);
93
+ }, [navigation, title, badges, conversation?.deleted, reply_root_id, replyHeaderTitle, muted]);
95
94
  if (!conversation || conversation.deleted) {
96
95
  return (<View style={styles.container}>
97
96
  <BlankState.Root>
@@ -112,7 +111,7 @@ function ConversationScreenContent({ route }) {
112
111
  if (item.type === 'ReplyShadowMessage') {
113
112
  return (<ReplyShadowMessage {...item} conversation_id={conversation_id} inReplyScreen={!!reply_root_id}/>);
114
113
  }
115
- return (<Message {...item} canDeleteNonAuthoredMessages={canDeleteNonAuthoredMessages} conversation_id={conversation_id} latestReadMessageSortKey={conversation?.latestReadMessageSortKey} inReplyScreen={!!reply_root_id} repliesEnabled={repliesEnabled}/>);
114
+ return (<Message {...item} canDeleteNonAuthoredMessages={canDeleteNonAuthoredMessages} conversation_id={conversation_id} latestReadMessageSortKey={conversation?.latestReadMessageSortKey} inReplyScreen={!!reply_root_id}/>);
116
115
  }} onEndReached={() => fetchNextPage()} ListHeaderComponent={<View style={styles.listHeader}/>}/>)}
117
116
  <JumpToBottomButton onPress={handleReturnToBottom} visible={showJumpToBottomButton}/>
118
117
  {!noMessages && <TypingIndicator />}
@@ -164,7 +163,7 @@ const useDateSeparatorStyles = () => {
164
163
  },
165
164
  });
166
165
  };
167
- export const groupMessages = ({ ms, inReplyScreen, repliesEnabled = false, }) => {
166
+ export const groupMessages = ({ ms, inReplyScreen }) => {
168
167
  let enrichedMessages = [];
169
168
  let encounteredOneOfMyMessages = false;
170
169
  ms.forEach((message, i) => {
@@ -199,8 +198,7 @@ export const groupMessages = ({ ms, inReplyScreen, repliesEnabled = false, }) =>
199
198
  prevMessageMoreThan5Minutes ||
200
199
  prevMessageDifferentThread ||
201
200
  prevMessageIsDateSeparator);
202
- const nextIsReplyShadowMessage = repliesEnabled &&
203
- nextMessageInThread &&
201
+ const nextIsReplyShadowMessage = nextMessageInThread &&
204
202
  !nextMessageThreadRoot &&
205
203
  (nextMessageDifferentThread || nextMessageIsDateSeparator);
206
204
  if (message.mine && !encounteredOneOfMyMessages) {
@@ -231,7 +229,7 @@ export const groupMessages = ({ ms, inReplyScreen, repliesEnabled = false, }) =>
231
229
  message.threadPosition = 'center';
232
230
  }
233
231
  enrichedMessages.push(message);
234
- if (insertReplyShadowMessage && repliesEnabled) {
232
+ if (insertReplyShadowMessage) {
235
233
  enrichedMessages.push({
236
234
  type: 'ReplyShadowMessage',
237
235
  id: `${message.id}-${message.replyRootId}`,
@@ -246,7 +244,7 @@ export const groupMessages = ({ ms, inReplyScreen, repliesEnabled = false, }) =>
246
244
  });
247
245
  return enrichedMessages;
248
246
  };
249
- export const ConversationScreenTitle = ({ conversation_id, badge, children, style, deleted, }) => {
247
+ export const ConversationScreenTitle = ({ conversation_id, badge, children, style, deleted, muted, }) => {
250
248
  const styles = usePressableHeaderStyle();
251
249
  const navigation = useNavigation();
252
250
  const resourceType = badge?.pcoResourceType || '';
@@ -258,9 +256,12 @@ export const ConversationScreenTitle = ({ conversation_id, badge, children, styl
258
256
  navigation.navigate('ConversationDetails', { conversation_id });
259
257
  }}>
260
258
  <View style={styles.titleWrapper}>
261
- <HeaderTitle maxFontSizeMultiplier={1} style={style}>
262
- {children}
263
- </HeaderTitle>
259
+ <View style={styles.titleTextContainer}>
260
+ <HeaderTitle maxFontSizeMultiplier={1} style={style}>
261
+ {children}
262
+ </HeaderTitle>
263
+ </View>
264
+ {muted && <Icon name="general.bellMuted" size={12}/>}
264
265
  {!deleted && <Icon name="general.downChevron" size={12}/>}
265
266
  </View>
266
267
  <Badge variant="metaSubtle" productLogoName={productName} label={resourceType} metaLabel={name} style={styles.badge} maxFontSizeMultiplier={1}/>
@@ -271,6 +272,7 @@ const usePressableHeaderStyle = () => {
271
272
  container: {
272
273
  alignItems: Platform.select({ android: 'flex-start', default: 'center' }),
273
274
  marginRight: Platform.select({ ios: 20, default: 16 }),
275
+ flex: 1,
274
276
  },
275
277
  titleWrapper: {
276
278
  alignItems: 'center',
@@ -278,6 +280,10 @@ const usePressableHeaderStyle = () => {
278
280
  flexDirection: 'row',
279
281
  flexShrink: 1,
280
282
  },
283
+ titleTextContainer: {
284
+ flexShrink: 1,
285
+ minWidth: 0,
286
+ },
281
287
  badge: {
282
288
  alignSelf: Platform.select({ android: 'flex-start', default: 'center' }),
283
289
  marginTop: 2,