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