@planningcenter/chat-react-native 4.7.0 → 4.7.1-qa-staging.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.
Files changed (175) hide show
  1. package/build/components/conversations/conversation_actions.d.ts.map +1 -1
  2. package/build/components/conversations/conversation_actions.js +333 -193
  3. package/build/components/conversations/conversation_actions.js.map +1 -1
  4. package/build/components/conversations/conversation_preview.d.ts.map +1 -1
  5. package/build/components/conversations/conversation_preview.js +106 -91
  6. package/build/components/conversations/conversation_preview.js.map +1 -1
  7. package/build/components/conversations/conversations.d.ts.map +1 -1
  8. package/build/components/conversations/conversations.js +63 -56
  9. package/build/components/conversations/conversations.js.map +1 -1
  10. package/build/components/conversations/conversations_blank_state.d.ts +2 -1
  11. package/build/components/conversations/conversations_blank_state.d.ts.map +1 -1
  12. package/build/components/conversations/conversations_blank_state.js +71 -39
  13. package/build/components/conversations/conversations_blank_state.js.map +1 -1
  14. package/build/components/conversations/hidden_indicator.d.ts +4 -0
  15. package/build/components/conversations/hidden_indicator.d.ts.map +1 -0
  16. package/build/components/conversations/hidden_indicator.js +52 -0
  17. package/build/components/conversations/hidden_indicator.js.map +1 -0
  18. package/build/components/conversations/hidden_results_footer.d.ts +2 -0
  19. package/build/components/conversations/hidden_results_footer.d.ts.map +1 -0
  20. package/build/components/conversations/hidden_results_footer.js +34 -0
  21. package/build/components/conversations/hidden_results_footer.js.map +1 -0
  22. package/build/components/display/toast.d.ts +3 -0
  23. package/build/components/display/toast.d.ts.map +1 -0
  24. package/build/components/display/toast.js +224 -0
  25. package/build/components/display/toast.js.map +1 -0
  26. package/build/components/group_conversation_list.d.ts.map +1 -1
  27. package/build/components/group_conversation_list.js +1 -0
  28. package/build/components/group_conversation_list.js.map +1 -1
  29. package/build/contexts/conversations_context.d.ts +3 -1
  30. package/build/contexts/conversations_context.d.ts.map +1 -1
  31. package/build/contexts/conversations_context.js +39 -31
  32. package/build/contexts/conversations_context.js.map +1 -1
  33. package/build/hooks/groups/use_group_members_for_new_conversation.d.ts +6 -0
  34. package/build/hooks/groups/use_group_members_for_new_conversation.d.ts.map +1 -1
  35. package/build/hooks/use_api.d.ts +6 -0
  36. package/build/hooks/use_api.d.ts.map +1 -1
  37. package/build/hooks/use_api.js +8 -5
  38. package/build/hooks/use_api.js.map +1 -1
  39. package/build/hooks/use_clear_conversation_filters.d.ts.map +1 -1
  40. package/build/hooks/use_clear_conversation_filters.js +1 -0
  41. package/build/hooks/use_clear_conversation_filters.js.map +1 -1
  42. package/build/hooks/use_conversation.d.ts.map +1 -1
  43. package/build/hooks/use_conversation.js +1 -1
  44. package/build/hooks/use_conversation.js.map +1 -1
  45. package/build/hooks/use_features.d.ts +1 -0
  46. package/build/hooks/use_features.d.ts.map +1 -1
  47. package/build/hooks/use_features.js +2 -1
  48. package/build/hooks/use_features.js.map +1 -1
  49. package/build/hooks/use_groups.d.ts +6 -0
  50. package/build/hooks/use_groups.d.ts.map +1 -1
  51. package/build/hooks/use_groups_groups.d.ts +6 -0
  52. package/build/hooks/use_groups_groups.d.ts.map +1 -1
  53. package/build/hooks/use_hidden_conversations_count.d.ts +2 -0
  54. package/build/hooks/use_hidden_conversations_count.d.ts.map +1 -0
  55. package/build/hooks/use_hidden_conversations_count.js +32 -0
  56. package/build/hooks/use_hidden_conversations_count.js.map +1 -0
  57. package/build/hooks/use_hide_conversation.d.ts +108 -0
  58. package/build/hooks/use_hide_conversation.d.ts.map +1 -0
  59. package/build/hooks/use_hide_conversation.js +243 -0
  60. package/build/hooks/use_hide_conversation.js.map +1 -0
  61. package/build/hooks/use_hide_conversations_enabled.d.ts +2 -0
  62. package/build/hooks/use_hide_conversations_enabled.d.ts.map +1 -0
  63. package/build/hooks/use_hide_conversations_enabled.js +18 -0
  64. package/build/hooks/use_hide_conversations_enabled.js.map +1 -0
  65. package/build/hooks/use_teams.d.ts +6 -0
  66. package/build/hooks/use_teams.d.ts.map +1 -1
  67. package/build/navigation/index.d.ts +5 -0
  68. package/build/navigation/index.d.ts.map +1 -1
  69. package/build/navigation/index.js +5 -0
  70. package/build/navigation/index.js.map +1 -1
  71. package/build/screens/conversation_actions_screen.d.ts +7 -0
  72. package/build/screens/conversation_actions_screen.d.ts.map +1 -0
  73. package/build/screens/conversation_actions_screen.js +89 -0
  74. package/build/screens/conversation_actions_screen.js.map +1 -0
  75. package/build/screens/conversation_details_screen.d.ts.map +1 -1
  76. package/build/screens/conversation_details_screen.js +460 -394
  77. package/build/screens/conversation_details_screen.js.map +1 -1
  78. package/build/screens/conversation_filters/components/conversation_filters.d.ts.map +1 -1
  79. package/build/screens/conversation_filters/components/conversation_filters.js +53 -12
  80. package/build/screens/conversation_filters/components/conversation_filters.js.map +1 -1
  81. package/build/screens/conversation_filters/components/rows.d.ts +6 -3
  82. package/build/screens/conversation_filters/components/rows.d.ts.map +1 -1
  83. package/build/screens/conversation_filters/components/rows.js +99 -62
  84. package/build/screens/conversation_filters/components/rows.js.map +1 -1
  85. package/build/screens/conversation_filters/context/conversation_filter_context.d.ts.map +1 -1
  86. package/build/screens/conversation_filters/context/conversation_filter_context.js +4 -0
  87. package/build/screens/conversation_filters/context/conversation_filter_context.js.map +1 -1
  88. package/build/screens/conversation_filters/filter_types.d.ts +1 -0
  89. package/build/screens/conversation_filters/filter_types.d.ts.map +1 -1
  90. package/build/screens/conversation_filters/filter_types.js +1 -0
  91. package/build/screens/conversation_filters/filter_types.js.map +1 -1
  92. package/build/screens/conversation_filters/hooks/filters.d.ts +12 -0
  93. package/build/screens/conversation_filters/hooks/filters.d.ts.map +1 -1
  94. package/build/screens/conversation_filters/screen_props.d.ts +1 -0
  95. package/build/screens/conversation_filters/screen_props.d.ts.map +1 -1
  96. package/build/screens/conversation_filters/screen_props.js.map +1 -1
  97. package/build/screens/conversations/components/filter_dropdown_list_header_component.d.ts.map +1 -1
  98. package/build/screens/conversations/components/filter_dropdown_list_header_component.js +138 -126
  99. package/build/screens/conversations/components/filter_dropdown_list_header_component.js.map +1 -1
  100. package/build/screens/conversations/components/list_header_component.d.ts.map +1 -1
  101. package/build/screens/conversations/components/list_header_component.js +95 -90
  102. package/build/screens/conversations/components/list_header_component.js.map +1 -1
  103. package/build/screens/conversations/components/search_list_header_component.d.ts.map +1 -1
  104. package/build/screens/conversations/components/search_list_header_component.js +100 -95
  105. package/build/screens/conversations/components/search_list_header_component.js.map +1 -1
  106. package/build/screens/conversations/conversations_screen.d.ts +1 -0
  107. package/build/screens/conversations/conversations_screen.d.ts.map +1 -1
  108. package/build/screens/conversations/conversations_screen.js +18 -10
  109. package/build/screens/conversations/conversations_screen.js.map +1 -1
  110. package/build/screens/index.d.ts +1 -0
  111. package/build/screens/index.d.ts.map +1 -1
  112. package/build/screens/index.js +1 -0
  113. package/build/screens/index.js.map +1 -1
  114. package/build/types/resources/conversation_membership.d.ts +1 -0
  115. package/build/types/resources/conversation_membership.d.ts.map +1 -1
  116. package/build/types/resources/conversation_membership.js.map +1 -1
  117. package/build/utils/request/conversation.d.ts +3 -1
  118. package/build/utils/request/conversation.d.ts.map +1 -1
  119. package/build/utils/request/conversation.js +4 -0
  120. package/build/utils/request/conversation.js.map +1 -1
  121. package/build/utils/toast_store.d.ts +21 -0
  122. package/build/utils/toast_store.d.ts.map +1 -0
  123. package/build/utils/toast_store.js +27 -0
  124. package/build/utils/toast_store.js.map +1 -0
  125. package/build/vendor/font_awesome_pro_solid_icons.d.ts +1 -0
  126. package/build/vendor/font_awesome_pro_solid_icons.d.ts.map +1 -1
  127. package/build/vendor/font_awesome_pro_solid_icons.js +5 -0
  128. package/build/vendor/font_awesome_pro_solid_icons.js.map +1 -1
  129. package/package.json +3 -3
  130. package/src/__tests__/screens/conversation_filters/components/conversation_filters.test.tsx +6 -0
  131. package/src/components/conversations/__tests__/conversation_actions.test.tsx +77 -2
  132. package/src/components/conversations/__tests__/conversation_preview.test.tsx +29 -0
  133. package/src/components/conversations/__tests__/conversations.test.tsx +26 -0
  134. package/src/components/conversations/__tests__/conversations_blank_state.test.tsx +17 -0
  135. package/src/components/conversations/conversation_actions.tsx +73 -4
  136. package/src/components/conversations/conversation_preview.tsx +12 -1
  137. package/src/components/conversations/conversations.tsx +9 -0
  138. package/src/components/conversations/conversations_blank_state.tsx +18 -0
  139. package/src/components/conversations/hidden_indicator.tsx +30 -0
  140. package/src/components/conversations/hidden_results_footer.tsx +25 -0
  141. package/src/components/display/__tests__/toast.test.tsx +55 -0
  142. package/src/components/display/toast.tsx +115 -0
  143. package/src/components/group_conversation_list.tsx +4 -1
  144. package/src/contexts/conversations_context.tsx +8 -1
  145. package/src/hooks/__tests__/use_hide_conversation.test.tsx +189 -0
  146. package/src/hooks/use_api.ts +2 -1
  147. package/src/hooks/use_clear_conversation_filters.ts +1 -0
  148. package/src/hooks/use_conversation.ts +1 -0
  149. package/src/hooks/use_features.ts +1 -0
  150. package/src/hooks/use_hidden_conversations_count.ts +14 -0
  151. package/src/hooks/use_hide_conversation.ts +128 -0
  152. package/src/hooks/use_hide_conversations_enabled.ts +7 -0
  153. package/src/navigation/index.tsx +8 -0
  154. package/src/screens/__tests__/conversation_actions_screen.test.tsx +79 -0
  155. package/src/screens/__tests__/conversation_details_screen.test.tsx +49 -1
  156. package/src/screens/conversation_actions_screen.tsx +53 -0
  157. package/src/screens/conversation_details_screen.tsx +19 -0
  158. package/src/screens/conversation_filters/__tests__/conversation_filters.test.tsx +42 -0
  159. package/src/screens/conversation_filters/components/conversation_filters.tsx +22 -3
  160. package/src/screens/conversation_filters/components/rows.tsx +44 -10
  161. package/src/screens/conversation_filters/context/conversation_filter_context.tsx +4 -0
  162. package/src/screens/conversation_filters/filter_types.ts +1 -0
  163. package/src/screens/conversation_filters/screen_props.ts +1 -0
  164. package/src/screens/conversations/__tests__/conversations_screen.test.tsx +1 -0
  165. package/src/screens/conversations/components/__tests__/filter_dropdown_list_header_component.test.tsx +42 -0
  166. package/src/screens/conversations/components/__tests__/list_header_component.test.tsx +1 -0
  167. package/src/screens/conversations/components/filter_dropdown_list_header_component.tsx +21 -5
  168. package/src/screens/conversations/components/list_header_component.tsx +14 -4
  169. package/src/screens/conversations/components/search_list_header_component.tsx +14 -4
  170. package/src/screens/conversations/conversations_screen.tsx +3 -0
  171. package/src/screens/index.ts +1 -0
  172. package/src/types/resources/conversation_membership.ts +1 -0
  173. package/src/utils/request/conversation.ts +6 -0
  174. package/src/utils/toast_store.ts +45 -0
  175. package/src/vendor/font_awesome_pro_solid_icons.ts +12 -0
@@ -1,16 +1,20 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
+ import { useNavigation } from '@react-navigation/native';
2
3
  import React, { useCallback, useEffect, useRef, useState } from 'react';
3
4
  import { Platform, Pressable, StyleSheet, View } from 'react-native';
4
5
  import ReanimatedSwipeable from 'react-native-gesture-handler/ReanimatedSwipeable';
5
6
  import { useConversationsContext } from '../../contexts/conversations_context';
6
7
  import { useTheme, useCreateAndroidRippleColor } from '../../hooks';
7
8
  import { useConversationsMarkRead, useConversationsMute } from '../../hooks/use_conversations_actions';
9
+ import { useHideConversation } from '../../hooks/use_hide_conversation';
10
+ import { useHideConversationsEnabled } from '../../hooks/use_hide_conversations_enabled';
8
11
  import { isArchivedConversation, platformPressedOpacityStyle } from '../../utils';
12
+ import { Haptic } from '../../utils/native_adapters';
9
13
  import { tokens } from '../../vendor/tapestry/tokens';
10
14
  import { SwipeableToggleButton } from './swipeable_toggle_button';
11
15
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
12
16
  export function ConversationActions(t0) {
13
- const $ = _c(66);
17
+ const $ = _c(90);
14
18
  const {
15
19
  children,
16
20
  conversation,
@@ -19,10 +23,13 @@ export function ConversationActions(t0) {
19
23
  accessibilityLabel
20
24
  } = t0;
21
25
  const swipeableRef = useRef(null);
26
+ const navigation = useNavigation();
22
27
  const styles = useStyles();
23
28
  const {
24
29
  activeConversationId,
25
- setActiveConversationId
30
+ setActiveConversationId,
31
+ hideable,
32
+ args
26
33
  } = useConversationsContext();
27
34
  const [disabled, setDisabled] = useState(false);
28
35
  const overshootLeft = Platform.OS === "ios";
@@ -67,253 +74,347 @@ export function ConversationActions(t0) {
67
74
  markRead,
68
75
  isPending: isMarkReadPending
69
76
  } = useConversationsMarkRead(t3);
70
- const isConversationEmpty = conversation.lastMessageCreatedAt === null;
71
- let t4;
72
- if ($[6] !== conversation) {
73
- t4 = isArchivedConversation(conversation);
77
+ const t4 = args.show_hidden || undefined;
78
+ let t5;
79
+ if ($[6] !== conversation || $[7] !== t4) {
80
+ t5 = {
81
+ conversation,
82
+ hidden: t4
83
+ };
74
84
  $[6] = conversation;
75
85
  $[7] = t4;
86
+ $[8] = t5;
76
87
  } else {
77
- t4 = $[7];
88
+ t5 = $[8];
78
89
  }
79
- const canMute = !t4;
80
- let t5;
81
- if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
82
- t5 = () => {
90
+ const {
91
+ hidden,
92
+ setHidden,
93
+ isPending: isHiddenPending
94
+ } = useHideConversation(t5);
95
+ const hideConversationsEnabled = useHideConversationsEnabled();
96
+ const isConversationEmpty = conversation.lastMessageCreatedAt === null;
97
+ let t6;
98
+ if ($[9] !== conversation) {
99
+ t6 = isArchivedConversation(conversation);
100
+ $[9] = conversation;
101
+ $[10] = t6;
102
+ } else {
103
+ t6 = $[10];
104
+ }
105
+ const canMute = !t6;
106
+ let t7;
107
+ if ($[11] !== conversation || $[12] !== hideConversationsEnabled || $[13] !== hideable) {
108
+ t7 = hideable && hideConversationsEnabled && !isArchivedConversation(conversation);
109
+ $[11] = conversation;
110
+ $[12] = hideConversationsEnabled;
111
+ $[13] = hideable;
112
+ $[14] = t7;
113
+ } else {
114
+ t7 = $[14];
115
+ }
116
+ const canHide = t7;
117
+ let t8;
118
+ if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
119
+ t8 = () => {
83
120
  setDisabled(false);
84
121
  swipeableRef.current?.close();
85
122
  };
86
- $[8] = t5;
123
+ $[15] = t8;
87
124
  } else {
88
- t5 = $[8];
125
+ t8 = $[15];
89
126
  }
90
- const handleSwipeableClose = t5;
91
- let t6;
92
- if ($[9] !== conversation.id || $[10] !== setActiveConversationId) {
93
- t6 = () => {
127
+ const handleSwipeableClose = t8;
128
+ let t9;
129
+ if ($[16] !== conversation.id || $[17] !== setActiveConversationId) {
130
+ t9 = () => {
94
131
  setDisabled(true);
95
132
  setActiveConversationId(conversation.id);
96
133
  };
97
- $[9] = conversation.id;
98
- $[10] = setActiveConversationId;
99
- $[11] = t6;
134
+ $[16] = conversation.id;
135
+ $[17] = setActiveConversationId;
136
+ $[18] = t9;
100
137
  } else {
101
- t6 = $[11];
138
+ t9 = $[18];
102
139
  }
103
- const handleSwipeableOpen = t6;
104
- let t7;
105
- if ($[12] !== disabled || $[13] !== onPress) {
106
- t7 = () => {
140
+ const handleSwipeableOpen = t9;
141
+ let t10;
142
+ if ($[19] !== disabled || $[20] !== onPress) {
143
+ t10 = () => {
107
144
  if (disabled || !onPress) {
108
145
  return;
109
146
  }
110
147
  onPress();
111
148
  };
112
- $[12] = disabled;
113
- $[13] = onPress;
114
- $[14] = t7;
149
+ $[19] = disabled;
150
+ $[20] = onPress;
151
+ $[21] = t10;
115
152
  } else {
116
- t7 = $[14];
153
+ t10 = $[21];
117
154
  }
118
- const handlePress = t7;
119
- let t8;
120
- if ($[15] !== muted || $[16] !== setMuted) {
121
- t8 = () => {
155
+ const handlePress = t10;
156
+ let t11;
157
+ if ($[22] !== muted || $[23] !== setMuted) {
158
+ t11 = () => {
122
159
  setMuted(!muted);
123
160
  handleSwipeableClose();
124
161
  };
125
- $[15] = muted;
126
- $[16] = setMuted;
127
- $[17] = t8;
162
+ $[22] = muted;
163
+ $[23] = setMuted;
164
+ $[24] = t11;
128
165
  } else {
129
- t8 = $[17];
166
+ t11 = $[24];
130
167
  }
131
- const handleMute = t8;
132
- let t9;
133
- if ($[18] !== markRead || $[19] !== read) {
134
- t9 = () => {
168
+ const handleMute = t11;
169
+ let t12;
170
+ if ($[25] !== hidden || $[26] !== setHidden) {
171
+ t12 = () => {
172
+ setHidden(!hidden);
173
+ handleSwipeableClose();
174
+ };
175
+ $[25] = hidden;
176
+ $[26] = setHidden;
177
+ $[27] = t12;
178
+ } else {
179
+ t12 = $[27];
180
+ }
181
+ const handleHide = t12;
182
+ let t13;
183
+ if ($[28] !== conversation.id || $[29] !== disabled || $[30] !== navigation) {
184
+ t13 = () => {
185
+ if (disabled) {
186
+ return;
187
+ }
188
+ Haptic.impactLight();
189
+ navigation.navigate("ConversationActions", {
190
+ conversation_id: conversation.id
191
+ });
192
+ };
193
+ $[28] = conversation.id;
194
+ $[29] = disabled;
195
+ $[30] = navigation;
196
+ $[31] = t13;
197
+ } else {
198
+ t13 = $[31];
199
+ }
200
+ const handleLongPress = t13;
201
+ let t14;
202
+ if ($[32] !== markRead || $[33] !== read) {
203
+ t14 = () => {
135
204
  markRead(!read);
136
205
  handleSwipeableClose();
137
206
  };
138
- $[18] = markRead;
139
- $[19] = read;
140
- $[20] = t9;
207
+ $[32] = markRead;
208
+ $[33] = read;
209
+ $[34] = t14;
141
210
  } else {
142
- t9 = $[20];
211
+ t14 = $[34];
143
212
  }
144
- const handleLatestMessageUnread = t9;
145
- let t10;
146
- if ($[21] !== isConversationEmpty || $[22] !== read) {
147
- t10 = !isConversationEmpty ? [{
213
+ const handleLatestMessageUnread = t14;
214
+ let t15;
215
+ if ($[35] !== isConversationEmpty || $[36] !== read) {
216
+ t15 = !isConversationEmpty ? [{
148
217
  name: read ? "markUnread" : "markRead",
149
218
  label: read ? "Mark unread" : "Mark read"
150
219
  }] : [];
151
- $[21] = isConversationEmpty;
152
- $[22] = read;
153
- $[23] = t10;
220
+ $[35] = isConversationEmpty;
221
+ $[36] = read;
222
+ $[37] = t15;
154
223
  } else {
155
- t10 = $[23];
224
+ t15 = $[37];
156
225
  }
157
- const readAccessibilityAction = t10;
158
- let t11;
159
- if ($[24] !== canMute || $[25] !== muted) {
160
- t11 = canMute ? [{
226
+ const readAccessibilityAction = t15;
227
+ let t16;
228
+ if ($[38] !== canMute || $[39] !== muted) {
229
+ t16 = canMute ? [{
161
230
  name: muted ? "unmute" : "mute",
162
231
  label: muted ? "Enable" : "Silence"
163
232
  }] : [];
164
- $[24] = canMute;
165
- $[25] = muted;
166
- $[26] = t11;
233
+ $[38] = canMute;
234
+ $[39] = muted;
235
+ $[40] = t16;
167
236
  } else {
168
- t11 = $[26];
237
+ t16 = $[40];
169
238
  }
170
- const muteAccessibilityAction = t11;
171
- let t12;
172
- if ($[27] !== muteAccessibilityAction || $[28] !== readAccessibilityAction) {
173
- t12 = [...muteAccessibilityAction, ...readAccessibilityAction];
174
- $[27] = muteAccessibilityAction;
175
- $[28] = readAccessibilityAction;
176
- $[29] = t12;
239
+ const muteAccessibilityAction = t16;
240
+ let t17;
241
+ if ($[41] !== canHide || $[42] !== hidden) {
242
+ t17 = canHide ? [{
243
+ name: hidden ? "unhide" : "hide",
244
+ label: hidden ? "Unhide" : "Hide"
245
+ }] : [];
246
+ $[41] = canHide;
247
+ $[42] = hidden;
248
+ $[43] = t17;
177
249
  } else {
178
- t12 = $[29];
250
+ t17 = $[43];
179
251
  }
180
- const accessibilityActions = t12;
181
- let t13;
182
- if ($[30] !== handleLatestMessageUnread || $[31] !== handleMute) {
183
- t13 = event => {
184
- bb45: switch (event.nativeEvent.actionName) {
252
+ const hideAccessibilityAction = t17;
253
+ let t18;
254
+ if ($[44] !== hideAccessibilityAction || $[45] !== muteAccessibilityAction || $[46] !== readAccessibilityAction) {
255
+ t18 = [...muteAccessibilityAction, ...hideAccessibilityAction, ...readAccessibilityAction];
256
+ $[44] = hideAccessibilityAction;
257
+ $[45] = muteAccessibilityAction;
258
+ $[46] = readAccessibilityAction;
259
+ $[47] = t18;
260
+ } else {
261
+ t18 = $[47];
262
+ }
263
+ const accessibilityActions = t18;
264
+ let t19;
265
+ if ($[48] !== handleHide || $[49] !== handleLatestMessageUnread || $[50] !== handleMute) {
266
+ t19 = event => {
267
+ bb74: switch (event.nativeEvent.actionName) {
185
268
  case "markRead":
186
269
  {
187
270
  handleLatestMessageUnread();
188
- break bb45;
271
+ break bb74;
189
272
  }
190
273
  case "markUnread":
191
274
  {
192
275
  handleLatestMessageUnread();
193
- break bb45;
276
+ break bb74;
194
277
  }
195
278
  case "mute":
196
279
  {
197
280
  handleMute();
198
- break bb45;
281
+ break bb74;
199
282
  }
200
283
  case "unmute":
201
284
  {
202
285
  handleMute();
286
+ break bb74;
287
+ }
288
+ case "hide":
289
+ case "unhide":
290
+ {
291
+ handleHide();
203
292
  }
204
293
  }
205
294
  };
206
- $[30] = handleLatestMessageUnread;
207
- $[31] = handleMute;
208
- $[32] = t13;
295
+ $[48] = handleHide;
296
+ $[49] = handleLatestMessageUnread;
297
+ $[50] = handleMute;
298
+ $[51] = t19;
209
299
  } else {
210
- t13 = $[32];
300
+ t19 = $[51];
211
301
  }
212
- const handleAccessibilityAction = t13;
213
- let t14;
214
- let t15;
215
- if ($[33] !== activeConversationId || $[34] !== conversation.id) {
216
- t14 = () => {
302
+ const handleAccessibilityAction = t19;
303
+ let t20;
304
+ let t21;
305
+ if ($[52] !== activeConversationId || $[53] !== conversation.id) {
306
+ t20 = () => {
217
307
  if (activeConversationId === conversation.id) {
218
308
  return;
219
309
  }
220
310
  handleSwipeableClose();
221
311
  };
222
- t15 = [activeConversationId, conversation.id, handleSwipeableClose];
223
- $[33] = activeConversationId;
224
- $[34] = conversation.id;
225
- $[35] = t14;
226
- $[36] = t15;
312
+ t21 = [activeConversationId, conversation.id, handleSwipeableClose];
313
+ $[52] = activeConversationId;
314
+ $[53] = conversation.id;
315
+ $[54] = t20;
316
+ $[55] = t21;
227
317
  } else {
228
- t14 = $[35];
229
- t15 = $[36];
318
+ t20 = $[54];
319
+ t21 = $[55];
230
320
  }
231
- useEffect(t14, t15);
232
- let t16;
233
- if ($[37] === Symbol.for("react.memo_cache_sentinel")) {
234
- t16 = () => setDisabled(false);
235
- $[37] = t16;
321
+ useEffect(t20, t21);
322
+ let t22;
323
+ if ($[56] === Symbol.for("react.memo_cache_sentinel")) {
324
+ t22 = () => setDisabled(false);
325
+ $[56] = t22;
236
326
  } else {
237
- t16 = $[37];
327
+ t22 = $[56];
238
328
  }
239
- let t17;
240
- if ($[38] !== canMute || $[39] !== handleLatestMessageUnread || $[40] !== handleMute || $[41] !== isConversationEmpty || $[42] !== isMarkReadPending || $[43] !== isMutedPending || $[44] !== muted || $[45] !== read) {
241
- t17 = () => /*#__PURE__*/_jsx(LeftActions, {
329
+ let t23;
330
+ if ($[57] !== canHide || $[58] !== canMute || $[59] !== handleHide || $[60] !== handleLatestMessageUnread || $[61] !== handleMute || $[62] !== hidden || $[63] !== isConversationEmpty || $[64] !== isHiddenPending || $[65] !== isMarkReadPending || $[66] !== isMutedPending || $[67] !== muted || $[68] !== read) {
331
+ t23 = () => /*#__PURE__*/_jsx(LeftActions, {
242
332
  isConversationEmpty: isConversationEmpty,
243
333
  canMute: canMute,
334
+ canHide: canHide,
244
335
  handleMute: handleMute,
336
+ handleHide: handleHide,
245
337
  handleLatestMessageUnread: handleLatestMessageUnread,
246
338
  muted: muted,
339
+ hidden: hidden,
247
340
  read: read,
248
341
  isMutedPending: isMutedPending,
342
+ isHiddenPending: isHiddenPending,
249
343
  isMarkReadPending: isMarkReadPending
250
344
  });
251
- $[38] = canMute;
252
- $[39] = handleLatestMessageUnread;
253
- $[40] = handleMute;
254
- $[41] = isConversationEmpty;
255
- $[42] = isMarkReadPending;
256
- $[43] = isMutedPending;
257
- $[44] = muted;
258
- $[45] = read;
259
- $[46] = t17;
260
- } else {
261
- t17 = $[46];
262
- }
263
- const t18 = `conversation-${conversation.id}`;
264
- let t19;
265
- if ($[47] !== style) {
266
- t19 = t20 => {
345
+ $[57] = canHide;
346
+ $[58] = canMute;
347
+ $[59] = handleHide;
348
+ $[60] = handleLatestMessageUnread;
349
+ $[61] = handleMute;
350
+ $[62] = hidden;
351
+ $[63] = isConversationEmpty;
352
+ $[64] = isHiddenPending;
353
+ $[65] = isMarkReadPending;
354
+ $[66] = isMutedPending;
355
+ $[67] = muted;
356
+ $[68] = read;
357
+ $[69] = t23;
358
+ } else {
359
+ t23 = $[69];
360
+ }
361
+ const t24 = `conversation-${conversation.id}`;
362
+ const t25 = canHide ? handleLongPress : undefined;
363
+ let t26;
364
+ if ($[70] !== style) {
365
+ t26 = t27 => {
267
366
  const {
268
367
  pressed
269
- } = t20;
368
+ } = t27;
270
369
  return [style, pressed && platformPressedOpacityStyle];
271
370
  };
272
- $[47] = style;
273
- $[48] = t19;
371
+ $[70] = style;
372
+ $[71] = t26;
274
373
  } else {
275
- t19 = $[48];
374
+ t26 = $[71];
276
375
  }
277
- let t20;
278
- if ($[49] !== androidRippleColor) {
279
- t20 = {
376
+ let t27;
377
+ if ($[72] !== androidRippleColor) {
378
+ t27 = {
280
379
  color: androidRippleColor,
281
380
  borderless: false,
282
381
  foreground: true
283
382
  };
284
- $[49] = androidRippleColor;
285
- $[50] = t20;
383
+ $[72] = androidRippleColor;
384
+ $[73] = t27;
286
385
  } else {
287
- t20 = $[50];
386
+ t27 = $[73];
288
387
  }
289
- let t21;
290
- if ($[51] !== accessibilityActions || $[52] !== accessibilityLabel || $[53] !== children || $[54] !== handleAccessibilityAction || $[55] !== handlePress || $[56] !== t18 || $[57] !== t19 || $[58] !== t20) {
291
- t21 = /*#__PURE__*/_jsx(Pressable, {
292
- testID: t18,
388
+ let t28;
389
+ if ($[74] !== accessibilityActions || $[75] !== accessibilityLabel || $[76] !== children || $[77] !== handleAccessibilityAction || $[78] !== handlePress || $[79] !== t24 || $[80] !== t25 || $[81] !== t26 || $[82] !== t27) {
390
+ t28 = /*#__PURE__*/_jsx(Pressable, {
391
+ testID: t24,
293
392
  onPress: handlePress,
294
- style: t19,
295
- android_ripple: t20,
393
+ onLongPress: t25,
394
+ style: t26,
395
+ android_ripple: t27,
296
396
  accessibilityLabel: accessibilityLabel,
297
397
  accessibilityRole: "button",
298
398
  accessibilityActions: accessibilityActions,
299
399
  onAccessibilityAction: handleAccessibilityAction,
300
400
  children: children
301
401
  });
302
- $[51] = accessibilityActions;
303
- $[52] = accessibilityLabel;
304
- $[53] = children;
305
- $[54] = handleAccessibilityAction;
306
- $[55] = handlePress;
307
- $[56] = t18;
308
- $[57] = t19;
309
- $[58] = t20;
310
- $[59] = t21;
311
- } else {
312
- t21 = $[59];
402
+ $[74] = accessibilityActions;
403
+ $[75] = accessibilityLabel;
404
+ $[76] = children;
405
+ $[77] = handleAccessibilityAction;
406
+ $[78] = handlePress;
407
+ $[79] = t24;
408
+ $[80] = t25;
409
+ $[81] = t26;
410
+ $[82] = t27;
411
+ $[83] = t28;
412
+ } else {
413
+ t28 = $[83];
313
414
  }
314
- let t22;
315
- if ($[60] !== handleSwipeableOpen || $[61] !== styles.swipeableChildContainer || $[62] !== styles.swipeableContainer || $[63] !== t17 || $[64] !== t21) {
316
- t22 = /*#__PURE__*/_jsx(ReanimatedSwipeable, {
415
+ let t29;
416
+ if ($[84] !== handleSwipeableOpen || $[85] !== styles.swipeableChildContainer || $[86] !== styles.swipeableContainer || $[87] !== t23 || $[88] !== t28) {
417
+ t29 = /*#__PURE__*/_jsx(ReanimatedSwipeable, {
317
418
  ref: swipeableRef,
318
419
  childrenContainerStyle: styles.swipeableChildContainer,
319
420
  containerStyle: styles.swipeableContainer,
@@ -321,38 +422,42 @@ export function ConversationActions(t0) {
321
422
  overshootLeft: overshootLeft,
322
423
  overshootRight: false,
323
424
  onSwipeableOpenStartDrag: handleSwipeableOpen,
324
- onSwipeableClose: t16,
425
+ onSwipeableClose: t22,
325
426
  renderRightActions: _temp,
326
- renderLeftActions: t17,
327
- children: t21
427
+ renderLeftActions: t23,
428
+ children: t28
328
429
  });
329
- $[60] = handleSwipeableOpen;
330
- $[61] = styles.swipeableChildContainer;
331
- $[62] = styles.swipeableContainer;
332
- $[63] = t17;
333
- $[64] = t21;
334
- $[65] = t22;
430
+ $[84] = handleSwipeableOpen;
431
+ $[85] = styles.swipeableChildContainer;
432
+ $[86] = styles.swipeableContainer;
433
+ $[87] = t23;
434
+ $[88] = t28;
435
+ $[89] = t29;
335
436
  } else {
336
- t22 = $[65];
437
+ t29 = $[89];
337
438
  }
338
- return t22;
439
+ return t29;
339
440
  }
340
441
  function _temp() {
341
442
  return /*#__PURE__*/_jsx(_Fragment, {});
342
443
  }
343
444
  function LeftActions(t0) {
344
- const $ = _c(18);
445
+ const $ = _c(25);
345
446
  const {
346
447
  isConversationEmpty,
347
448
  canMute,
449
+ canHide,
348
450
  handleMute,
451
+ handleHide,
349
452
  handleLatestMessageUnread,
350
453
  muted,
454
+ hidden,
351
455
  read,
352
456
  isMutedPending,
457
+ isHiddenPending,
353
458
  isMarkReadPending
354
459
  } = t0;
355
- const t1 = canMute ? 2 : 1;
460
+ const t1 = 1 + Number(canMute) + Number(canHide);
356
461
  let t2;
357
462
  if ($[0] !== t1) {
358
463
  t2 = {
@@ -384,6 +489,23 @@ function LeftActions(t0) {
384
489
  let t4;
385
490
  if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
386
491
  t4 = {
492
+ true: {
493
+ iconName: "general.showEye",
494
+ label: "Unhide"
495
+ },
496
+ false: {
497
+ iconName: "general.hideEye",
498
+ label: "Hide"
499
+ }
500
+ };
501
+ $[3] = t4;
502
+ } else {
503
+ t4 = $[3];
504
+ }
505
+ const hideToggleContent = t4;
506
+ let t5;
507
+ if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
508
+ t5 = {
387
509
  true: {
388
510
  iconName: "general.outlinedTextMessage",
389
511
  label: "Mark read"
@@ -393,61 +515,79 @@ function LeftActions(t0) {
393
515
  label: "Mark unread"
394
516
  }
395
517
  };
396
- $[3] = t4;
518
+ $[4] = t5;
397
519
  } else {
398
- t4 = $[3];
520
+ t5 = $[4];
399
521
  }
400
- const latestMessageUnreadToggleContent = t4;
401
- const t5 = !read;
402
- let t6;
403
- if ($[4] !== handleLatestMessageUnread || $[5] !== isConversationEmpty || $[6] !== isMarkReadPending || $[7] !== t5) {
404
- t6 = /*#__PURE__*/_jsx(SwipeableToggleButton, {
522
+ const latestMessageUnreadToggleContent = t5;
523
+ const t6 = !read;
524
+ let t7;
525
+ if ($[5] !== handleLatestMessageUnread || $[6] !== isConversationEmpty || $[7] !== isMarkReadPending || $[8] !== t6) {
526
+ t7 = /*#__PURE__*/_jsx(SwipeableToggleButton, {
405
527
  loading: isMarkReadPending,
406
528
  disabled: isConversationEmpty,
407
- toggled: t5,
529
+ toggled: t6,
408
530
  onPress: handleLatestMessageUnread,
409
531
  toggleContent: latestMessageUnreadToggleContent,
410
532
  backgroundColor: tokens.fillColorInteractionSwipeDefault
411
533
  });
412
- $[4] = handleLatestMessageUnread;
413
- $[5] = isConversationEmpty;
414
- $[6] = isMarkReadPending;
415
- $[7] = t5;
534
+ $[5] = handleLatestMessageUnread;
535
+ $[6] = isConversationEmpty;
536
+ $[7] = isMarkReadPending;
416
537
  $[8] = t6;
538
+ $[9] = t7;
417
539
  } else {
418
- t6 = $[8];
540
+ t7 = $[9];
419
541
  }
420
- let t7;
421
- if ($[9] !== canMute || $[10] !== handleMute || $[11] !== isMutedPending || $[12] !== muted) {
422
- t7 = canMute && /*#__PURE__*/_jsx(SwipeableToggleButton, {
542
+ let t8;
543
+ if ($[10] !== canMute || $[11] !== handleMute || $[12] !== isMutedPending || $[13] !== muted) {
544
+ t8 = canMute && /*#__PURE__*/_jsx(SwipeableToggleButton, {
423
545
  loading: isMutedPending,
424
546
  toggled: muted,
425
547
  onPress: handleMute,
426
548
  toggleContent: muteToggleContent,
427
549
  backgroundColor: tokens.fillColorInteractionSwipeSecondary
428
550
  });
429
- $[9] = canMute;
430
- $[10] = handleMute;
431
- $[11] = isMutedPending;
432
- $[12] = muted;
433
- $[13] = t7;
551
+ $[10] = canMute;
552
+ $[11] = handleMute;
553
+ $[12] = isMutedPending;
554
+ $[13] = muted;
555
+ $[14] = t8;
434
556
  } else {
435
- t7 = $[13];
557
+ t8 = $[14];
436
558
  }
437
- let t8;
438
- if ($[14] !== styles.actionButtonContainer || $[15] !== t6 || $[16] !== t7) {
439
- t8 = /*#__PURE__*/_jsxs(View, {
559
+ let t9;
560
+ if ($[15] !== canHide || $[16] !== handleHide || $[17] !== hidden || $[18] !== isHiddenPending) {
561
+ t9 = canHide && /*#__PURE__*/_jsx(SwipeableToggleButton, {
562
+ loading: isHiddenPending,
563
+ toggled: hidden,
564
+ onPress: handleHide,
565
+ toggleContent: hideToggleContent,
566
+ backgroundColor: tokens.colorNeutral45
567
+ });
568
+ $[15] = canHide;
569
+ $[16] = handleHide;
570
+ $[17] = hidden;
571
+ $[18] = isHiddenPending;
572
+ $[19] = t9;
573
+ } else {
574
+ t9 = $[19];
575
+ }
576
+ let t10;
577
+ if ($[20] !== styles.actionButtonContainer || $[21] !== t7 || $[22] !== t8 || $[23] !== t9) {
578
+ t10 = /*#__PURE__*/_jsxs(View, {
440
579
  style: styles.actionButtonContainer,
441
- children: [t6, t7]
580
+ children: [t7, t8, t9]
442
581
  });
443
- $[14] = styles.actionButtonContainer;
444
- $[15] = t6;
445
- $[16] = t7;
446
- $[17] = t8;
582
+ $[20] = styles.actionButtonContainer;
583
+ $[21] = t7;
584
+ $[22] = t8;
585
+ $[23] = t9;
586
+ $[24] = t10;
447
587
  } else {
448
- t8 = $[17];
588
+ t10 = $[24];
449
589
  }
450
- return t8;
590
+ return t10;
451
591
  }
452
592
  const ACTION_BUTTON_WIDTH = 120;
453
593
  const useStyles = t0 => {