@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.
- package/build/components/conversation/message_form.d.ts.map +1 -1
- package/build/components/conversation/message_form.js +31 -25
- package/build/components/conversation/message_form.js.map +1 -1
- package/build/components/conversations/app_update_banner.d.ts +2 -0
- package/build/components/conversations/app_update_banner.d.ts.map +1 -0
- package/build/components/conversations/app_update_banner.js +52 -0
- package/build/components/conversations/app_update_banner.js.map +1 -0
- package/build/components/conversations/bulk_conversation_actions_bar.d.ts +2 -0
- package/build/components/conversations/bulk_conversation_actions_bar.d.ts.map +1 -0
- package/build/components/conversations/bulk_conversation_actions_bar.js +215 -0
- package/build/components/conversations/bulk_conversation_actions_bar.js.map +1 -0
- package/build/components/conversations/conversation_actions.d.ts.map +1 -1
- package/build/components/conversations/conversation_actions.js +202 -161
- package/build/components/conversations/conversation_actions.js.map +1 -1
- package/build/components/conversations/conversation_preview.d.ts.map +1 -1
- package/build/components/conversations/conversation_preview.js +129 -115
- package/build/components/conversations/conversation_preview.js.map +1 -1
- package/build/components/conversations/swipeable_toggle_button.d.ts +5 -1
- package/build/components/conversations/swipeable_toggle_button.d.ts.map +1 -1
- package/build/components/conversations/swipeable_toggle_button.js +96 -67
- package/build/components/conversations/swipeable_toggle_button.js.map +1 -1
- package/build/components/display/icon.d.ts +3 -1
- package/build/components/display/icon.d.ts.map +1 -1
- package/build/components/display/icon.js +2 -0
- package/build/components/display/icon.js.map +1 -1
- package/build/components/primitive/banner_primitive.js +7 -3
- package/build/components/primitive/banner_primitive.js.map +1 -1
- package/build/screens/conversation_actions_screen.d.ts +2 -0
- package/build/screens/conversation_actions_screen.d.ts.map +1 -1
- package/build/screens/conversation_actions_screen.js +380 -46
- package/build/screens/conversation_actions_screen.js.map +1 -1
- package/build/screens/conversations/conversations_screen.d.ts +1 -0
- package/build/screens/conversations/conversations_screen.d.ts.map +1 -1
- package/build/screens/conversations/conversations_screen.js +105 -33
- package/build/screens/conversations/conversations_screen.js.map +1 -1
- package/build/utils/theme.js +20 -21
- package/build/utils/theme.js.map +1 -1
- package/package.json +2 -2
- package/src/components/conversation/__tests__/message_form.test.tsx +19 -2
- package/src/components/conversation/message_form.tsx +15 -2
- package/src/components/conversations/__tests__/app_update_banner.test.tsx +27 -0
- package/src/components/conversations/__tests__/bulk_conversation_actions_bar.test.tsx +95 -0
- package/src/components/conversations/__tests__/conversation_actions.test.tsx +10 -3
- package/src/components/conversations/app_update_banner.tsx +36 -0
- package/src/components/conversations/bulk_conversation_actions_bar.tsx +140 -0
- package/src/components/conversations/conversation_actions.tsx +51 -34
- package/src/components/conversations/conversation_preview.tsx +8 -1
- package/src/components/conversations/swipeable_toggle_button.tsx +45 -16
- package/src/components/display/icon.tsx +3 -0
- package/src/components/primitive/banner_primitive.tsx +5 -1
- package/src/screens/__tests__/conversation_actions_screen.test.tsx +48 -6
- package/src/screens/conversation_actions_screen.tsx +145 -12
- package/src/screens/conversations/__tests__/conversations_screen.test.tsx +34 -8
- package/src/screens/conversations/conversations_screen.tsx +28 -2
- 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(
|
|
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] =
|
|
198
|
-
$[31] =
|
|
201
|
+
$[30] = muted;
|
|
202
|
+
$[31] = navigation;
|
|
203
|
+
$[32] = read;
|
|
204
|
+
$[33] = t13;
|
|
199
205
|
} else {
|
|
200
|
-
t13 = $[
|
|
206
|
+
t13 = $[33];
|
|
201
207
|
}
|
|
202
208
|
const handleLongPress = t13;
|
|
203
209
|
let t14;
|
|
204
|
-
if ($[
|
|
210
|
+
if ($[34] !== markRead || $[35] !== read) {
|
|
205
211
|
t14 = () => {
|
|
206
212
|
markRead(!read);
|
|
207
213
|
handleSwipeableClose();
|
|
208
214
|
};
|
|
209
|
-
$[
|
|
210
|
-
$[
|
|
211
|
-
$[
|
|
215
|
+
$[34] = markRead;
|
|
216
|
+
$[35] = read;
|
|
217
|
+
$[36] = t14;
|
|
212
218
|
} else {
|
|
213
|
-
t14 = $[
|
|
219
|
+
t14 = $[36];
|
|
214
220
|
}
|
|
215
221
|
const handleLatestMessageUnread = t14;
|
|
216
222
|
let t15;
|
|
217
|
-
if ($[
|
|
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
|
-
$[
|
|
223
|
-
$[
|
|
224
|
-
$[
|
|
228
|
+
$[37] = isConversationEmpty;
|
|
229
|
+
$[38] = read;
|
|
230
|
+
$[39] = t15;
|
|
225
231
|
} else {
|
|
226
|
-
t15 = $[
|
|
232
|
+
t15 = $[39];
|
|
227
233
|
}
|
|
228
234
|
const readAccessibilityAction = t15;
|
|
229
235
|
let t16;
|
|
230
|
-
if ($[
|
|
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
|
-
$[
|
|
236
|
-
$[
|
|
237
|
-
$[
|
|
241
|
+
$[40] = canMute;
|
|
242
|
+
$[41] = muted;
|
|
243
|
+
$[42] = t16;
|
|
238
244
|
} else {
|
|
239
|
-
t16 = $[
|
|
245
|
+
t16 = $[42];
|
|
240
246
|
}
|
|
241
247
|
const muteAccessibilityAction = t16;
|
|
242
248
|
let t17;
|
|
243
|
-
if ($[
|
|
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
|
-
$[
|
|
249
|
-
$[
|
|
250
|
-
$[
|
|
254
|
+
$[43] = canHide;
|
|
255
|
+
$[44] = hidden;
|
|
256
|
+
$[45] = t17;
|
|
251
257
|
} else {
|
|
252
|
-
t17 = $[
|
|
258
|
+
t17 = $[45];
|
|
253
259
|
}
|
|
254
260
|
const hideAccessibilityAction = t17;
|
|
255
261
|
let t18;
|
|
256
|
-
if ($[
|
|
262
|
+
if ($[46] !== hideAccessibilityAction || $[47] !== muteAccessibilityAction || $[48] !== readAccessibilityAction || $[49] !== selectMode) {
|
|
257
263
|
t18 = selectMode ? [] : [...muteAccessibilityAction, ...hideAccessibilityAction, ...readAccessibilityAction];
|
|
258
|
-
$[
|
|
259
|
-
$[
|
|
260
|
-
$[
|
|
261
|
-
$[
|
|
262
|
-
$[
|
|
264
|
+
$[46] = hideAccessibilityAction;
|
|
265
|
+
$[47] = muteAccessibilityAction;
|
|
266
|
+
$[48] = readAccessibilityAction;
|
|
267
|
+
$[49] = selectMode;
|
|
268
|
+
$[50] = t18;
|
|
263
269
|
} else {
|
|
264
|
-
t18 = $[
|
|
270
|
+
t18 = $[50];
|
|
265
271
|
}
|
|
266
272
|
const accessibilityActions = t18;
|
|
267
273
|
let t19;
|
|
268
|
-
if ($[
|
|
274
|
+
if ($[51] !== handleHide || $[52] !== handleLatestMessageUnread || $[53] !== handleMute) {
|
|
269
275
|
t19 = event => {
|
|
270
|
-
|
|
276
|
+
bb86: switch (event.nativeEvent.actionName) {
|
|
271
277
|
case "markRead":
|
|
272
278
|
{
|
|
273
279
|
handleLatestMessageUnread();
|
|
274
|
-
break
|
|
280
|
+
break bb86;
|
|
275
281
|
}
|
|
276
282
|
case "markUnread":
|
|
277
283
|
{
|
|
278
284
|
handleLatestMessageUnread();
|
|
279
|
-
break
|
|
285
|
+
break bb86;
|
|
280
286
|
}
|
|
281
287
|
case "mute":
|
|
282
288
|
{
|
|
283
289
|
handleMute();
|
|
284
|
-
break
|
|
290
|
+
break bb86;
|
|
285
291
|
}
|
|
286
292
|
case "unmute":
|
|
287
293
|
{
|
|
288
294
|
handleMute();
|
|
289
|
-
break
|
|
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
|
-
$[
|
|
299
|
-
$[
|
|
300
|
-
$[
|
|
301
|
-
$[
|
|
304
|
+
$[51] = handleHide;
|
|
305
|
+
$[52] = handleLatestMessageUnread;
|
|
306
|
+
$[53] = handleMute;
|
|
307
|
+
$[54] = t19;
|
|
302
308
|
} else {
|
|
303
|
-
t19 = $[
|
|
309
|
+
t19 = $[54];
|
|
304
310
|
}
|
|
305
311
|
const handleAccessibilityAction = t19;
|
|
306
312
|
let t20;
|
|
307
313
|
let t21;
|
|
308
|
-
if ($[
|
|
314
|
+
if ($[55] !== selectMode) {
|
|
309
315
|
t20 = () => {
|
|
310
316
|
if (selectMode) {
|
|
311
317
|
handleSwipeableClose();
|
|
312
318
|
}
|
|
313
319
|
};
|
|
314
320
|
t21 = [selectMode, handleSwipeableClose];
|
|
315
|
-
$[
|
|
316
|
-
$[
|
|
317
|
-
$[
|
|
321
|
+
$[55] = selectMode;
|
|
322
|
+
$[56] = t20;
|
|
323
|
+
$[57] = t21;
|
|
318
324
|
} else {
|
|
319
|
-
t20 = $[
|
|
320
|
-
t21 = $[
|
|
325
|
+
t20 = $[56];
|
|
326
|
+
t21 = $[57];
|
|
321
327
|
}
|
|
322
328
|
useEffect(t20, t21);
|
|
323
329
|
let t22;
|
|
324
330
|
let t23;
|
|
325
|
-
if ($[
|
|
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
|
-
$[
|
|
334
|
-
$[
|
|
335
|
-
$[
|
|
336
|
-
$[
|
|
339
|
+
$[58] = activeConversationId;
|
|
340
|
+
$[59] = conversation.id;
|
|
341
|
+
$[60] = t22;
|
|
342
|
+
$[61] = t23;
|
|
337
343
|
} else {
|
|
338
|
-
t22 = $[
|
|
339
|
-
t23 = $[
|
|
344
|
+
t22 = $[60];
|
|
345
|
+
t23 = $[61];
|
|
340
346
|
}
|
|
341
347
|
useEffect(t22, t23);
|
|
342
348
|
const t24 = !selectMode;
|
|
343
349
|
let t25;
|
|
344
|
-
if ($[
|
|
350
|
+
if ($[62] === Symbol.for("react.memo_cache_sentinel")) {
|
|
345
351
|
t25 = () => setDisabled(false);
|
|
346
|
-
$[
|
|
352
|
+
$[62] = t25;
|
|
347
353
|
} else {
|
|
348
|
-
t25 = $[
|
|
354
|
+
t25 = $[62];
|
|
349
355
|
}
|
|
350
356
|
let t26;
|
|
351
|
-
if ($[
|
|
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
|
-
$[
|
|
367
|
-
$[
|
|
368
|
-
$[
|
|
369
|
-
$[
|
|
370
|
-
$[
|
|
371
|
-
$[
|
|
372
|
-
$[
|
|
373
|
-
$[
|
|
374
|
-
$[
|
|
375
|
-
$[
|
|
376
|
-
$[
|
|
377
|
-
$[
|
|
378
|
-
$[
|
|
379
|
-
} else {
|
|
380
|
-
t26 = $[
|
|
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 =
|
|
391
|
+
const t28 = canOpenActions ? handleLongPress : undefined;
|
|
384
392
|
let t29;
|
|
385
|
-
if ($[
|
|
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
|
-
$[
|
|
393
|
-
$[
|
|
400
|
+
$[76] = style;
|
|
401
|
+
$[77] = t29;
|
|
394
402
|
} else {
|
|
395
|
-
t29 = $[
|
|
403
|
+
t29 = $[77];
|
|
396
404
|
}
|
|
397
405
|
let t30;
|
|
398
|
-
if ($[
|
|
406
|
+
if ($[78] !== androidRippleColor) {
|
|
399
407
|
t30 = {
|
|
400
408
|
color: androidRippleColor,
|
|
401
409
|
borderless: false,
|
|
402
410
|
foreground: true
|
|
403
411
|
};
|
|
404
|
-
$[
|
|
405
|
-
$[
|
|
412
|
+
$[78] = androidRippleColor;
|
|
413
|
+
$[79] = t30;
|
|
406
414
|
} else {
|
|
407
|
-
t30 = $[
|
|
415
|
+
t30 = $[79];
|
|
408
416
|
}
|
|
409
417
|
const t31 = selectMode ? "checkbox" : "button";
|
|
410
418
|
let t32;
|
|
411
|
-
if ($[
|
|
419
|
+
if ($[80] !== selectMode || $[81] !== selected) {
|
|
412
420
|
t32 = selectMode ? {
|
|
413
421
|
checked: selected
|
|
414
422
|
} : undefined;
|
|
415
|
-
$[
|
|
416
|
-
$[
|
|
417
|
-
$[
|
|
423
|
+
$[80] = selectMode;
|
|
424
|
+
$[81] = selected;
|
|
425
|
+
$[82] = t32;
|
|
418
426
|
} else {
|
|
419
|
-
t32 = $[
|
|
427
|
+
t32 = $[82];
|
|
420
428
|
}
|
|
421
429
|
let t33;
|
|
422
|
-
if ($[
|
|
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
|
-
$[
|
|
437
|
-
$[
|
|
438
|
-
$[
|
|
439
|
-
$[
|
|
440
|
-
$[
|
|
441
|
-
$[
|
|
442
|
-
$[
|
|
443
|
-
$[
|
|
444
|
-
$[
|
|
445
|
-
$[
|
|
446
|
-
$[
|
|
447
|
-
$[
|
|
448
|
-
} else {
|
|
449
|
-
t33 = $[
|
|
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 ($[
|
|
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
|
-
$[
|
|
468
|
-
$[
|
|
469
|
-
$[
|
|
470
|
-
$[
|
|
471
|
-
$[
|
|
472
|
-
$[
|
|
473
|
-
$[
|
|
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 = $[
|
|
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(
|
|
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
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
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:
|
|
590
|
+
toggled: t7,
|
|
568
591
|
onPress: handleLatestMessageUnread,
|
|
569
592
|
toggleContent: latestMessageUnreadToggleContent,
|
|
570
593
|
backgroundColor: tokens.fillColorInteractionSwipeDefault
|
|
571
594
|
});
|
|
572
|
-
$[
|
|
573
|
-
$[
|
|
574
|
-
$[
|
|
575
|
-
$[
|
|
576
|
-
$[
|
|
595
|
+
$[8] = handleLatestMessageUnread;
|
|
596
|
+
$[9] = isConversationEmpty;
|
|
597
|
+
$[10] = isMarkReadPending;
|
|
598
|
+
$[11] = progress;
|
|
599
|
+
$[12] = t7;
|
|
600
|
+
$[13] = t8;
|
|
577
601
|
} else {
|
|
578
|
-
|
|
602
|
+
t8 = $[13];
|
|
579
603
|
}
|
|
580
|
-
let
|
|
581
|
-
if ($[
|
|
582
|
-
|
|
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
|
-
$[
|
|
590
|
-
$[
|
|
591
|
-
$[
|
|
592
|
-
$[
|
|
593
|
-
$[
|
|
614
|
+
$[14] = canMute;
|
|
615
|
+
$[15] = handleMute;
|
|
616
|
+
$[16] = isMutedPending;
|
|
617
|
+
$[17] = muted;
|
|
618
|
+
$[18] = progress;
|
|
619
|
+
$[19] = t9;
|
|
594
620
|
} else {
|
|
595
|
-
|
|
621
|
+
t9 = $[19];
|
|
596
622
|
}
|
|
597
|
-
let
|
|
598
|
-
if ($[
|
|
599
|
-
|
|
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
|
-
$[
|
|
607
|
-
$[
|
|
608
|
-
$[
|
|
609
|
-
$[
|
|
610
|
-
$[
|
|
633
|
+
$[20] = canHide;
|
|
634
|
+
$[21] = handleHide;
|
|
635
|
+
$[22] = hidden;
|
|
636
|
+
$[23] = isHiddenPending;
|
|
637
|
+
$[24] = progress;
|
|
638
|
+
$[25] = t10;
|
|
611
639
|
} else {
|
|
612
|
-
|
|
640
|
+
t10 = $[25];
|
|
613
641
|
}
|
|
614
|
-
let
|
|
615
|
-
if ($[
|
|
616
|
-
|
|
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:
|
|
660
|
+
children: t11
|
|
619
661
|
});
|
|
620
|
-
$[
|
|
621
|
-
$[
|
|
622
|
-
$[
|
|
623
|
-
$[23] = t9;
|
|
624
|
-
$[24] = t10;
|
|
662
|
+
$[31] = styles.actionButtonContainer;
|
|
663
|
+
$[32] = t11;
|
|
664
|
+
$[33] = t12;
|
|
625
665
|
} else {
|
|
626
|
-
|
|
666
|
+
t12 = $[33];
|
|
627
667
|
}
|
|
628
|
-
return
|
|
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
|
-
|
|
657
|
-
width: ACTION_BUTTON_WIDTH * actionButtonCount,
|
|
658
|
-
alignContent: "stretch"
|
|
699
|
+
height: "100%"
|
|
659
700
|
},
|
|
660
701
|
swipeableContainer: {
|
|
661
702
|
backgroundColor: colors.surfaceColor090
|