@planningcenter/chat-react-native 4.8.0-rc.9 → 4.8.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 (55) hide show
  1. package/build/components/conversation/message_form.d.ts.map +1 -1
  2. package/build/components/conversation/message_form.js +31 -25
  3. package/build/components/conversation/message_form.js.map +1 -1
  4. package/build/components/conversations/app_update_banner.d.ts +2 -0
  5. package/build/components/conversations/app_update_banner.d.ts.map +1 -0
  6. package/build/components/conversations/app_update_banner.js +52 -0
  7. package/build/components/conversations/app_update_banner.js.map +1 -0
  8. package/build/components/conversations/bulk_conversation_actions_bar.d.ts +2 -0
  9. package/build/components/conversations/bulk_conversation_actions_bar.d.ts.map +1 -0
  10. package/build/components/conversations/bulk_conversation_actions_bar.js +215 -0
  11. package/build/components/conversations/bulk_conversation_actions_bar.js.map +1 -0
  12. package/build/components/conversations/conversation_actions.d.ts.map +1 -1
  13. package/build/components/conversations/conversation_actions.js +202 -161
  14. package/build/components/conversations/conversation_actions.js.map +1 -1
  15. package/build/components/conversations/conversation_preview.d.ts.map +1 -1
  16. package/build/components/conversations/conversation_preview.js +129 -115
  17. package/build/components/conversations/conversation_preview.js.map +1 -1
  18. package/build/components/conversations/swipeable_toggle_button.d.ts +5 -1
  19. package/build/components/conversations/swipeable_toggle_button.d.ts.map +1 -1
  20. package/build/components/conversations/swipeable_toggle_button.js +96 -67
  21. package/build/components/conversations/swipeable_toggle_button.js.map +1 -1
  22. package/build/components/display/icon.d.ts +3 -1
  23. package/build/components/display/icon.d.ts.map +1 -1
  24. package/build/components/display/icon.js +2 -0
  25. package/build/components/display/icon.js.map +1 -1
  26. package/build/components/primitive/banner_primitive.js +7 -3
  27. package/build/components/primitive/banner_primitive.js.map +1 -1
  28. package/build/screens/conversation_actions_screen.d.ts +2 -0
  29. package/build/screens/conversation_actions_screen.d.ts.map +1 -1
  30. package/build/screens/conversation_actions_screen.js +380 -46
  31. package/build/screens/conversation_actions_screen.js.map +1 -1
  32. package/build/screens/conversations/conversations_screen.d.ts +1 -0
  33. package/build/screens/conversations/conversations_screen.d.ts.map +1 -1
  34. package/build/screens/conversations/conversations_screen.js +105 -33
  35. package/build/screens/conversations/conversations_screen.js.map +1 -1
  36. package/build/utils/theme.js +20 -21
  37. package/build/utils/theme.js.map +1 -1
  38. package/package.json +2 -2
  39. package/src/components/conversation/__tests__/message_form.test.tsx +19 -2
  40. package/src/components/conversation/message_form.tsx +15 -2
  41. package/src/components/conversations/__tests__/app_update_banner.test.tsx +27 -0
  42. package/src/components/conversations/__tests__/bulk_conversation_actions_bar.test.tsx +95 -0
  43. package/src/components/conversations/__tests__/conversation_actions.test.tsx +10 -3
  44. package/src/components/conversations/app_update_banner.tsx +36 -0
  45. package/src/components/conversations/bulk_conversation_actions_bar.tsx +140 -0
  46. package/src/components/conversations/conversation_actions.tsx +51 -34
  47. package/src/components/conversations/conversation_preview.tsx +8 -1
  48. package/src/components/conversations/swipeable_toggle_button.tsx +45 -16
  49. package/src/components/display/icon.tsx +3 -0
  50. package/src/components/primitive/banner_primitive.tsx +5 -1
  51. package/src/screens/__tests__/conversation_actions_screen.test.tsx +48 -6
  52. package/src/screens/conversation_actions_screen.tsx +145 -12
  53. package/src/screens/conversations/__tests__/conversations_screen.test.tsx +34 -8
  54. package/src/screens/conversations/conversations_screen.tsx +28 -2
  55. package/src/utils/theme.ts +20 -21
@@ -3,6 +3,7 @@ import { useNavigation } from '@react-navigation/native';
3
3
  import React, { useCallback, useEffect, useRef, useState } from 'react';
4
4
  import { Platform, Pressable, StyleSheet, View } from 'react-native';
5
5
  import ReanimatedSwipeable from 'react-native-gesture-handler/ReanimatedSwipeable';
6
+ import Animated, { useAnimatedStyle } from 'react-native-reanimated';
6
7
  import { useConversationsContext } from '../../contexts/conversations_context';
7
8
  import { useTheme, useCreateAndroidRippleColor } from '../../hooks';
8
9
  import { useConversationsMarkRead, useConversationsMute } from '../../hooks/use_conversations_actions';
@@ -11,10 +12,10 @@ import { useHideConversationsEnabled } from '../../hooks/use_hide_conversations_
11
12
  import { isArchivedConversation, platformPressedOpacityStyle } from '../../utils';
12
13
  import { Haptic } from '../../utils/native_adapters';
13
14
  import { tokens } from '../../vendor/tapestry/tokens';
14
- import { SwipeableToggleButton } from './swipeable_toggle_button';
15
+ import { SWIPEABLE_TOGGLE_BUTTON_WIDTH, SwipeableToggleButton } from './swipeable_toggle_button';
15
16
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
16
17
  export function ConversationActions(t0) {
17
- const $ = _c(100);
18
+ const $ = _c(102);
18
19
  const {
19
20
  children,
20
21
  conversation,
@@ -116,6 +117,7 @@ export function ConversationActions(t0) {
116
117
  }
117
118
  const canHide = t7;
118
119
  const selectMode = selected !== undefined;
120
+ const canOpenActions = hideable && hideConversationsEnabled && !selectMode;
119
121
  let t8;
120
122
  if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
121
123
  t8 = () => {
@@ -182,111 +184,115 @@ export function ConversationActions(t0) {
182
184
  }
183
185
  const handleHide = t12;
184
186
  let t13;
185
- if ($[28] !== conversation.id || $[29] !== disabled || $[30] !== navigation) {
187
+ if ($[28] !== conversation.id || $[29] !== disabled || $[30] !== muted || $[31] !== navigation || $[32] !== read) {
186
188
  t13 = () => {
187
189
  if (disabled) {
188
190
  return;
189
191
  }
190
192
  Haptic.impactLight();
191
193
  navigation.navigate("ConversationActions", {
192
- conversation_id: conversation.id
194
+ conversation_id: conversation.id,
195
+ read,
196
+ muted
193
197
  });
194
198
  };
195
199
  $[28] = conversation.id;
196
200
  $[29] = disabled;
197
- $[30] = navigation;
198
- $[31] = t13;
201
+ $[30] = muted;
202
+ $[31] = navigation;
203
+ $[32] = read;
204
+ $[33] = t13;
199
205
  } else {
200
- t13 = $[31];
206
+ t13 = $[33];
201
207
  }
202
208
  const handleLongPress = t13;
203
209
  let t14;
204
- if ($[32] !== markRead || $[33] !== read) {
210
+ if ($[34] !== markRead || $[35] !== read) {
205
211
  t14 = () => {
206
212
  markRead(!read);
207
213
  handleSwipeableClose();
208
214
  };
209
- $[32] = markRead;
210
- $[33] = read;
211
- $[34] = t14;
215
+ $[34] = markRead;
216
+ $[35] = read;
217
+ $[36] = t14;
212
218
  } else {
213
- t14 = $[34];
219
+ t14 = $[36];
214
220
  }
215
221
  const handleLatestMessageUnread = t14;
216
222
  let t15;
217
- if ($[35] !== isConversationEmpty || $[36] !== read) {
223
+ if ($[37] !== isConversationEmpty || $[38] !== read) {
218
224
  t15 = !isConversationEmpty ? [{
219
225
  name: read ? "markUnread" : "markRead",
220
226
  label: read ? "Mark unread" : "Mark read"
221
227
  }] : [];
222
- $[35] = isConversationEmpty;
223
- $[36] = read;
224
- $[37] = t15;
228
+ $[37] = isConversationEmpty;
229
+ $[38] = read;
230
+ $[39] = t15;
225
231
  } else {
226
- t15 = $[37];
232
+ t15 = $[39];
227
233
  }
228
234
  const readAccessibilityAction = t15;
229
235
  let t16;
230
- if ($[38] !== canMute || $[39] !== muted) {
236
+ if ($[40] !== canMute || $[41] !== muted) {
231
237
  t16 = canMute ? [{
232
238
  name: muted ? "unmute" : "mute",
233
239
  label: muted ? "Enable" : "Silence"
234
240
  }] : [];
235
- $[38] = canMute;
236
- $[39] = muted;
237
- $[40] = t16;
241
+ $[40] = canMute;
242
+ $[41] = muted;
243
+ $[42] = t16;
238
244
  } else {
239
- t16 = $[40];
245
+ t16 = $[42];
240
246
  }
241
247
  const muteAccessibilityAction = t16;
242
248
  let t17;
243
- if ($[41] !== canHide || $[42] !== hidden) {
249
+ if ($[43] !== canHide || $[44] !== hidden) {
244
250
  t17 = canHide ? [{
245
251
  name: hidden ? "unhide" : "hide",
246
252
  label: hidden ? "Unhide" : "Hide"
247
253
  }] : [];
248
- $[41] = canHide;
249
- $[42] = hidden;
250
- $[43] = t17;
254
+ $[43] = canHide;
255
+ $[44] = hidden;
256
+ $[45] = t17;
251
257
  } else {
252
- t17 = $[43];
258
+ t17 = $[45];
253
259
  }
254
260
  const hideAccessibilityAction = t17;
255
261
  let t18;
256
- if ($[44] !== hideAccessibilityAction || $[45] !== muteAccessibilityAction || $[46] !== readAccessibilityAction || $[47] !== selectMode) {
262
+ if ($[46] !== hideAccessibilityAction || $[47] !== muteAccessibilityAction || $[48] !== readAccessibilityAction || $[49] !== selectMode) {
257
263
  t18 = selectMode ? [] : [...muteAccessibilityAction, ...hideAccessibilityAction, ...readAccessibilityAction];
258
- $[44] = hideAccessibilityAction;
259
- $[45] = muteAccessibilityAction;
260
- $[46] = readAccessibilityAction;
261
- $[47] = selectMode;
262
- $[48] = t18;
264
+ $[46] = hideAccessibilityAction;
265
+ $[47] = muteAccessibilityAction;
266
+ $[48] = readAccessibilityAction;
267
+ $[49] = selectMode;
268
+ $[50] = t18;
263
269
  } else {
264
- t18 = $[48];
270
+ t18 = $[50];
265
271
  }
266
272
  const accessibilityActions = t18;
267
273
  let t19;
268
- if ($[49] !== handleHide || $[50] !== handleLatestMessageUnread || $[51] !== handleMute) {
274
+ if ($[51] !== handleHide || $[52] !== handleLatestMessageUnread || $[53] !== handleMute) {
269
275
  t19 = event => {
270
- bb78: switch (event.nativeEvent.actionName) {
276
+ bb86: switch (event.nativeEvent.actionName) {
271
277
  case "markRead":
272
278
  {
273
279
  handleLatestMessageUnread();
274
- break bb78;
280
+ break bb86;
275
281
  }
276
282
  case "markUnread":
277
283
  {
278
284
  handleLatestMessageUnread();
279
- break bb78;
285
+ break bb86;
280
286
  }
281
287
  case "mute":
282
288
  {
283
289
  handleMute();
284
- break bb78;
290
+ break bb86;
285
291
  }
286
292
  case "unmute":
287
293
  {
288
294
  handleMute();
289
- break bb78;
295
+ break bb86;
290
296
  }
291
297
  case "hide":
292
298
  case "unhide":
@@ -295,34 +301,34 @@ export function ConversationActions(t0) {
295
301
  }
296
302
  }
297
303
  };
298
- $[49] = handleHide;
299
- $[50] = handleLatestMessageUnread;
300
- $[51] = handleMute;
301
- $[52] = t19;
304
+ $[51] = handleHide;
305
+ $[52] = handleLatestMessageUnread;
306
+ $[53] = handleMute;
307
+ $[54] = t19;
302
308
  } else {
303
- t19 = $[52];
309
+ t19 = $[54];
304
310
  }
305
311
  const handleAccessibilityAction = t19;
306
312
  let t20;
307
313
  let t21;
308
- if ($[53] !== selectMode) {
314
+ if ($[55] !== selectMode) {
309
315
  t20 = () => {
310
316
  if (selectMode) {
311
317
  handleSwipeableClose();
312
318
  }
313
319
  };
314
320
  t21 = [selectMode, handleSwipeableClose];
315
- $[53] = selectMode;
316
- $[54] = t20;
317
- $[55] = t21;
321
+ $[55] = selectMode;
322
+ $[56] = t20;
323
+ $[57] = t21;
318
324
  } else {
319
- t20 = $[54];
320
- t21 = $[55];
325
+ t20 = $[56];
326
+ t21 = $[57];
321
327
  }
322
328
  useEffect(t20, t21);
323
329
  let t22;
324
330
  let t23;
325
- if ($[56] !== activeConversationId || $[57] !== conversation.id) {
331
+ if ($[58] !== activeConversationId || $[59] !== conversation.id) {
326
332
  t22 = () => {
327
333
  if (activeConversationId === conversation.id) {
328
334
  return;
@@ -330,26 +336,28 @@ export function ConversationActions(t0) {
330
336
  handleSwipeableClose();
331
337
  };
332
338
  t23 = [activeConversationId, conversation.id, handleSwipeableClose];
333
- $[56] = activeConversationId;
334
- $[57] = conversation.id;
335
- $[58] = t22;
336
- $[59] = t23;
339
+ $[58] = activeConversationId;
340
+ $[59] = conversation.id;
341
+ $[60] = t22;
342
+ $[61] = t23;
337
343
  } else {
338
- t22 = $[58];
339
- t23 = $[59];
344
+ t22 = $[60];
345
+ t23 = $[61];
340
346
  }
341
347
  useEffect(t22, t23);
342
348
  const t24 = !selectMode;
343
349
  let t25;
344
- if ($[60] === Symbol.for("react.memo_cache_sentinel")) {
350
+ if ($[62] === Symbol.for("react.memo_cache_sentinel")) {
345
351
  t25 = () => setDisabled(false);
346
- $[60] = t25;
352
+ $[62] = t25;
347
353
  } else {
348
- t25 = $[60];
354
+ t25 = $[62];
349
355
  }
350
356
  let t26;
351
- if ($[61] !== canHide || $[62] !== canMute || $[63] !== handleHide || $[64] !== handleLatestMessageUnread || $[65] !== handleMute || $[66] !== hidden || $[67] !== isConversationEmpty || $[68] !== isHiddenPending || $[69] !== isMarkReadPending || $[70] !== isMutedPending || $[71] !== muted || $[72] !== read) {
352
- t26 = () => /*#__PURE__*/_jsx(LeftActions, {
357
+ if ($[63] !== canHide || $[64] !== canMute || $[65] !== handleHide || $[66] !== handleLatestMessageUnread || $[67] !== handleMute || $[68] !== hidden || $[69] !== isConversationEmpty || $[70] !== isHiddenPending || $[71] !== isMarkReadPending || $[72] !== isMutedPending || $[73] !== muted || $[74] !== read) {
358
+ t26 = (progress, translation) => /*#__PURE__*/_jsx(LeftActions, {
359
+ progress: progress,
360
+ translation: translation,
353
361
  isConversationEmpty: isConversationEmpty,
354
362
  canMute: canMute,
355
363
  canHide: canHide,
@@ -363,63 +371,63 @@ export function ConversationActions(t0) {
363
371
  isHiddenPending: isHiddenPending,
364
372
  isMarkReadPending: isMarkReadPending
365
373
  });
366
- $[61] = canHide;
367
- $[62] = canMute;
368
- $[63] = handleHide;
369
- $[64] = handleLatestMessageUnread;
370
- $[65] = handleMute;
371
- $[66] = hidden;
372
- $[67] = isConversationEmpty;
373
- $[68] = isHiddenPending;
374
- $[69] = isMarkReadPending;
375
- $[70] = isMutedPending;
376
- $[71] = muted;
377
- $[72] = read;
378
- $[73] = t26;
379
- } else {
380
- t26 = $[73];
374
+ $[63] = canHide;
375
+ $[64] = canMute;
376
+ $[65] = handleHide;
377
+ $[66] = handleLatestMessageUnread;
378
+ $[67] = handleMute;
379
+ $[68] = hidden;
380
+ $[69] = isConversationEmpty;
381
+ $[70] = isHiddenPending;
382
+ $[71] = isMarkReadPending;
383
+ $[72] = isMutedPending;
384
+ $[73] = muted;
385
+ $[74] = read;
386
+ $[75] = t26;
387
+ } else {
388
+ t26 = $[75];
381
389
  }
382
390
  const t27 = `conversation-${conversation.id}`;
383
- const t28 = canHide ? handleLongPress : undefined;
391
+ const t28 = canOpenActions ? handleLongPress : undefined;
384
392
  let t29;
385
- if ($[74] !== style) {
393
+ if ($[76] !== style) {
386
394
  t29 = t30 => {
387
395
  const {
388
396
  pressed
389
397
  } = t30;
390
398
  return [style, pressed && platformPressedOpacityStyle];
391
399
  };
392
- $[74] = style;
393
- $[75] = t29;
400
+ $[76] = style;
401
+ $[77] = t29;
394
402
  } else {
395
- t29 = $[75];
403
+ t29 = $[77];
396
404
  }
397
405
  let t30;
398
- if ($[76] !== androidRippleColor) {
406
+ if ($[78] !== androidRippleColor) {
399
407
  t30 = {
400
408
  color: androidRippleColor,
401
409
  borderless: false,
402
410
  foreground: true
403
411
  };
404
- $[76] = androidRippleColor;
405
- $[77] = t30;
412
+ $[78] = androidRippleColor;
413
+ $[79] = t30;
406
414
  } else {
407
- t30 = $[77];
415
+ t30 = $[79];
408
416
  }
409
417
  const t31 = selectMode ? "checkbox" : "button";
410
418
  let t32;
411
- if ($[78] !== selectMode || $[79] !== selected) {
419
+ if ($[80] !== selectMode || $[81] !== selected) {
412
420
  t32 = selectMode ? {
413
421
  checked: selected
414
422
  } : undefined;
415
- $[78] = selectMode;
416
- $[79] = selected;
417
- $[80] = t32;
423
+ $[80] = selectMode;
424
+ $[81] = selected;
425
+ $[82] = t32;
418
426
  } else {
419
- t32 = $[80];
427
+ t32 = $[82];
420
428
  }
421
429
  let t33;
422
- if ($[81] !== accessibilityActions || $[82] !== accessibilityLabel || $[83] !== children || $[84] !== handleAccessibilityAction || $[85] !== handlePress || $[86] !== t27 || $[87] !== t28 || $[88] !== t29 || $[89] !== t30 || $[90] !== t31 || $[91] !== t32) {
430
+ if ($[83] !== accessibilityActions || $[84] !== accessibilityLabel || $[85] !== children || $[86] !== handleAccessibilityAction || $[87] !== handlePress || $[88] !== t27 || $[89] !== t28 || $[90] !== t29 || $[91] !== t30 || $[92] !== t31 || $[93] !== t32) {
423
431
  t33 = /*#__PURE__*/_jsx(Pressable, {
424
432
  testID: t27,
425
433
  onPress: handlePress,
@@ -433,23 +441,23 @@ export function ConversationActions(t0) {
433
441
  onAccessibilityAction: handleAccessibilityAction,
434
442
  children: children
435
443
  });
436
- $[81] = accessibilityActions;
437
- $[82] = accessibilityLabel;
438
- $[83] = children;
439
- $[84] = handleAccessibilityAction;
440
- $[85] = handlePress;
441
- $[86] = t27;
442
- $[87] = t28;
443
- $[88] = t29;
444
- $[89] = t30;
445
- $[90] = t31;
446
- $[91] = t32;
447
- $[92] = t33;
448
- } else {
449
- t33 = $[92];
444
+ $[83] = accessibilityActions;
445
+ $[84] = accessibilityLabel;
446
+ $[85] = children;
447
+ $[86] = handleAccessibilityAction;
448
+ $[87] = handlePress;
449
+ $[88] = t27;
450
+ $[89] = t28;
451
+ $[90] = t29;
452
+ $[91] = t30;
453
+ $[92] = t31;
454
+ $[93] = t32;
455
+ $[94] = t33;
456
+ } else {
457
+ t33 = $[94];
450
458
  }
451
459
  let t34;
452
- if ($[93] !== handleSwipeableOpen || $[94] !== styles.swipeableChildContainer || $[95] !== styles.swipeableContainer || $[96] !== t24 || $[97] !== t26 || $[98] !== t33) {
460
+ if ($[95] !== handleSwipeableOpen || $[96] !== styles.swipeableChildContainer || $[97] !== styles.swipeableContainer || $[98] !== t24 || $[99] !== t26 || $[100] !== t33) {
453
461
  t34 = /*#__PURE__*/_jsx(ReanimatedSwipeable, {
454
462
  ref: swipeableRef,
455
463
  enabled: t24,
@@ -464,15 +472,15 @@ export function ConversationActions(t0) {
464
472
  renderLeftActions: t26,
465
473
  children: t33
466
474
  });
467
- $[93] = handleSwipeableOpen;
468
- $[94] = styles.swipeableChildContainer;
469
- $[95] = styles.swipeableContainer;
470
- $[96] = t24;
471
- $[97] = t26;
472
- $[98] = t33;
473
- $[99] = t34;
475
+ $[95] = handleSwipeableOpen;
476
+ $[96] = styles.swipeableChildContainer;
477
+ $[97] = styles.swipeableContainer;
478
+ $[98] = t24;
479
+ $[99] = t26;
480
+ $[100] = t33;
481
+ $[101] = t34;
474
482
  } else {
475
- t34 = $[99];
483
+ t34 = $[101];
476
484
  }
477
485
  return t34;
478
486
  }
@@ -480,8 +488,10 @@ function _temp() {
480
488
  return /*#__PURE__*/_jsx(_Fragment, {});
481
489
  }
482
490
  function LeftActions(t0) {
483
- const $ = _c(25);
491
+ const $ = _c(34);
484
492
  const {
493
+ progress,
494
+ translation,
485
495
  isConversationEmpty,
486
496
  canMute,
487
497
  canHide,
@@ -507,6 +517,9 @@ function LeftActions(t0) {
507
517
  t2 = $[1];
508
518
  }
509
519
  const styles = useStyles(t2);
520
+ const revealStyle = useAnimatedStyle(() => ({
521
+ width: Math.max(translation.value, 0)
522
+ }));
510
523
  let t3;
511
524
  if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
512
525
  t3 = {
@@ -558,76 +571,102 @@ function LeftActions(t0) {
558
571
  t5 = $[4];
559
572
  }
560
573
  const latestMessageUnreadToggleContent = t5;
561
- const t6 = !read;
562
- let t7;
563
- if ($[5] !== handleLatestMessageUnread || $[6] !== isConversationEmpty || $[7] !== isMarkReadPending || $[8] !== t6) {
564
- t7 = /*#__PURE__*/_jsx(SwipeableToggleButton, {
574
+ let t6;
575
+ if ($[5] !== revealStyle || $[6] !== styles.actionButtonReveal) {
576
+ t6 = [styles.actionButtonReveal, revealStyle];
577
+ $[5] = revealStyle;
578
+ $[6] = styles.actionButtonReveal;
579
+ $[7] = t6;
580
+ } else {
581
+ t6 = $[7];
582
+ }
583
+ const t7 = !read;
584
+ let t8;
585
+ if ($[8] !== handleLatestMessageUnread || $[9] !== isConversationEmpty || $[10] !== isMarkReadPending || $[11] !== progress || $[12] !== t7) {
586
+ t8 = /*#__PURE__*/_jsx(SwipeableToggleButton, {
587
+ progress: progress,
565
588
  loading: isMarkReadPending,
566
589
  disabled: isConversationEmpty,
567
- toggled: t6,
590
+ toggled: t7,
568
591
  onPress: handleLatestMessageUnread,
569
592
  toggleContent: latestMessageUnreadToggleContent,
570
593
  backgroundColor: tokens.fillColorInteractionSwipeDefault
571
594
  });
572
- $[5] = handleLatestMessageUnread;
573
- $[6] = isConversationEmpty;
574
- $[7] = isMarkReadPending;
575
- $[8] = t6;
576
- $[9] = t7;
595
+ $[8] = handleLatestMessageUnread;
596
+ $[9] = isConversationEmpty;
597
+ $[10] = isMarkReadPending;
598
+ $[11] = progress;
599
+ $[12] = t7;
600
+ $[13] = t8;
577
601
  } else {
578
- t7 = $[9];
602
+ t8 = $[13];
579
603
  }
580
- let t8;
581
- if ($[10] !== canMute || $[11] !== handleMute || $[12] !== isMutedPending || $[13] !== muted) {
582
- t8 = canMute && /*#__PURE__*/_jsx(SwipeableToggleButton, {
604
+ let t9;
605
+ if ($[14] !== canMute || $[15] !== handleMute || $[16] !== isMutedPending || $[17] !== muted || $[18] !== progress) {
606
+ t9 = canMute && /*#__PURE__*/_jsx(SwipeableToggleButton, {
607
+ progress: progress,
583
608
  loading: isMutedPending,
584
609
  toggled: muted,
585
610
  onPress: handleMute,
586
611
  toggleContent: muteToggleContent,
587
612
  backgroundColor: tokens.fillColorInteractionSwipeSecondary
588
613
  });
589
- $[10] = canMute;
590
- $[11] = handleMute;
591
- $[12] = isMutedPending;
592
- $[13] = muted;
593
- $[14] = t8;
614
+ $[14] = canMute;
615
+ $[15] = handleMute;
616
+ $[16] = isMutedPending;
617
+ $[17] = muted;
618
+ $[18] = progress;
619
+ $[19] = t9;
594
620
  } else {
595
- t8 = $[14];
621
+ t9 = $[19];
596
622
  }
597
- let t9;
598
- if ($[15] !== canHide || $[16] !== handleHide || $[17] !== hidden || $[18] !== isHiddenPending) {
599
- t9 = canHide && /*#__PURE__*/_jsx(SwipeableToggleButton, {
623
+ let t10;
624
+ if ($[20] !== canHide || $[21] !== handleHide || $[22] !== hidden || $[23] !== isHiddenPending || $[24] !== progress) {
625
+ t10 = canHide && /*#__PURE__*/_jsx(SwipeableToggleButton, {
626
+ progress: progress,
600
627
  loading: isHiddenPending,
601
628
  toggled: hidden,
602
629
  onPress: handleHide,
603
630
  toggleContent: hideToggleContent,
604
631
  backgroundColor: tokens.colorNeutral45
605
632
  });
606
- $[15] = canHide;
607
- $[16] = handleHide;
608
- $[17] = hidden;
609
- $[18] = isHiddenPending;
610
- $[19] = t9;
633
+ $[20] = canHide;
634
+ $[21] = handleHide;
635
+ $[22] = hidden;
636
+ $[23] = isHiddenPending;
637
+ $[24] = progress;
638
+ $[25] = t10;
611
639
  } else {
612
- t9 = $[19];
640
+ t10 = $[25];
613
641
  }
614
- let t10;
615
- if ($[20] !== styles.actionButtonContainer || $[21] !== t7 || $[22] !== t8 || $[23] !== t9) {
616
- t10 = /*#__PURE__*/_jsxs(View, {
642
+ let t11;
643
+ if ($[26] !== t10 || $[27] !== t6 || $[28] !== t8 || $[29] !== t9) {
644
+ t11 = /*#__PURE__*/_jsxs(Animated.View, {
645
+ style: t6,
646
+ children: [t8, t9, t10]
647
+ });
648
+ $[26] = t10;
649
+ $[27] = t6;
650
+ $[28] = t8;
651
+ $[29] = t9;
652
+ $[30] = t11;
653
+ } else {
654
+ t11 = $[30];
655
+ }
656
+ let t12;
657
+ if ($[31] !== styles.actionButtonContainer || $[32] !== t11) {
658
+ t12 = /*#__PURE__*/_jsx(View, {
617
659
  style: styles.actionButtonContainer,
618
- children: [t7, t8, t9]
660
+ children: t11
619
661
  });
620
- $[20] = styles.actionButtonContainer;
621
- $[21] = t7;
622
- $[22] = t8;
623
- $[23] = t9;
624
- $[24] = t10;
662
+ $[31] = styles.actionButtonContainer;
663
+ $[32] = t11;
664
+ $[33] = t12;
625
665
  } else {
626
- t10 = $[24];
666
+ t12 = $[33];
627
667
  }
628
- return t10;
668
+ return t12;
629
669
  }
630
- const ACTION_BUTTON_WIDTH = 120;
631
670
  const useStyles = t0 => {
632
671
  const $ = _c(6);
633
672
  let t1;
@@ -652,10 +691,12 @@ const useStyles = t0 => {
652
691
  backgroundColor: colors.conversationActionsBackground
653
692
  },
654
693
  actionButtonContainer: {
694
+ width: SWIPEABLE_TOGGLE_BUTTON_WIDTH * actionButtonCount,
695
+ height: "100%"
696
+ },
697
+ actionButtonReveal: {
655
698
  flexDirection: "row",
656
- alignItems: "center",
657
- width: ACTION_BUTTON_WIDTH * actionButtonCount,
658
- alignContent: "stretch"
699
+ height: "100%"
659
700
  },
660
701
  swipeableContainer: {
661
702
  backgroundColor: colors.surfaceColor090