@planningcenter/chat-react-native 4.2.1-qa-staging.3 → 4.2.1-qa-staging.5
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/contexts/api_provider.d.ts.map +1 -1
- package/build/contexts/api_provider.js +2 -1
- package/build/contexts/api_provider.js.map +1 -1
- package/build/hooks/use_fetch_newer_messages.d.ts +2 -1
- package/build/hooks/use_fetch_newer_messages.d.ts.map +1 -1
- package/build/hooks/use_fetch_newer_messages.js +16 -9
- package/build/hooks/use_fetch_newer_messages.js.map +1 -1
- package/build/screens/conversation_screen.d.ts.map +1 -1
- package/build/screens/conversation_screen.js +286 -274
- package/build/screens/conversation_screen.js.map +1 -1
- package/build/utils/cache/invalidate_refetchable_queries.d.ts +3 -0
- package/build/utils/cache/invalidate_refetchable_queries.d.ts.map +1 -0
- package/build/utils/cache/invalidate_refetchable_queries.js +8 -0
- package/build/utils/cache/invalidate_refetchable_queries.js.map +1 -0
- package/build/utils/cache/messages_cache.d.ts +1 -0
- package/build/utils/cache/messages_cache.d.ts.map +1 -1
- package/build/utils/cache/messages_cache.js +3 -0
- package/build/utils/cache/messages_cache.js.map +1 -1
- package/package.json +3 -3
- package/src/contexts/api_provider.tsx +2 -1
- package/src/hooks/__tests__/use_fetch_newer_messages.test.tsx +27 -0
- package/src/hooks/use_fetch_newer_messages.ts +11 -3
- package/src/screens/conversation_screen.tsx +8 -2
- package/src/utils/cache/__tests__/invalidate_refetchable_queries.test.ts +23 -0
- package/src/utils/cache/__tests__/messages_cache.test.ts +14 -1
- package/src/utils/cache/invalidate_refetchable_queries.ts +9 -0
- package/src/utils/cache/messages_cache.ts +3 -0
|
@@ -28,6 +28,7 @@ import { useMarkLatestMessageRead } from '../hooks/use_mark_latest_message_read'
|
|
|
28
28
|
import { analyticsEvents, normalizeAnalyticsMetadata, usePublishProductAnalyticsEvent } from '../hooks/use_product_analytics';
|
|
29
29
|
import { useRestAwayFromDismissEdge } from '../hooks/use_rest_away_from_dismiss_edge';
|
|
30
30
|
import { useVideoModerationJoltEvents } from '../hooks/use_video_moderation_jolt_events';
|
|
31
|
+
import { newestPersistedMessageId } from '../utils/cache/messages_cache';
|
|
31
32
|
import { gatedMessageCache } from '../utils/gated_message_cache';
|
|
32
33
|
import { getMessagesQueryKey } from '../utils/request/get_messages';
|
|
33
34
|
import { decodeUlidTime } from '../utils/ulid';
|
|
@@ -156,7 +157,7 @@ export function ConversationScreen(t0) {
|
|
|
156
157
|
return t10;
|
|
157
158
|
}
|
|
158
159
|
function ConversationScreenContent(t0) {
|
|
159
|
-
const $ = _c(
|
|
160
|
+
const $ = _c(121);
|
|
160
161
|
const {
|
|
161
162
|
route,
|
|
162
163
|
anchor,
|
|
@@ -201,119 +202,130 @@ function ConversationScreenContent(t0) {
|
|
|
201
202
|
const caughtUp = !hasPreviousPage;
|
|
202
203
|
const [showJumpToBottomButton, setShowJumpToBottomButton] = useState(false);
|
|
203
204
|
const readingHistory = showJumpToBottomButton;
|
|
204
|
-
const newestMessageId = messages[0]?.id;
|
|
205
205
|
let t2;
|
|
206
|
-
if ($[4] !==
|
|
207
|
-
t2 =
|
|
206
|
+
if ($[4] !== messages) {
|
|
207
|
+
t2 = newestPersistedMessageId(messages);
|
|
208
|
+
$[4] = messages;
|
|
209
|
+
$[5] = t2;
|
|
210
|
+
} else {
|
|
211
|
+
t2 = $[5];
|
|
212
|
+
}
|
|
213
|
+
const newestMessageId = t2;
|
|
214
|
+
const t3 = anchored ? onExitAnchoredMode : undefined;
|
|
215
|
+
let t4;
|
|
216
|
+
if ($[6] !== conversation_id || $[7] !== queryKey || $[8] !== reply_root_id || $[9] !== t3) {
|
|
217
|
+
t4 = {
|
|
208
218
|
conversation_id,
|
|
209
219
|
reply_root_id,
|
|
210
|
-
queryKey
|
|
220
|
+
queryKey,
|
|
221
|
+
onTooFarBehind: t3
|
|
211
222
|
};
|
|
212
|
-
$[
|
|
213
|
-
$[
|
|
214
|
-
$[
|
|
215
|
-
$[
|
|
223
|
+
$[6] = conversation_id;
|
|
224
|
+
$[7] = queryKey;
|
|
225
|
+
$[8] = reply_root_id;
|
|
226
|
+
$[9] = t3;
|
|
227
|
+
$[10] = t4;
|
|
216
228
|
} else {
|
|
217
|
-
|
|
229
|
+
t4 = $[10];
|
|
218
230
|
}
|
|
219
|
-
const fetchNewer = useFetchNewerMessages(
|
|
220
|
-
let
|
|
221
|
-
if ($[
|
|
222
|
-
|
|
231
|
+
const fetchNewer = useFetchNewerMessages(t4);
|
|
232
|
+
let t5;
|
|
233
|
+
if ($[11] !== caughtUp || $[12] !== fetchNewer || $[13] !== newestMessageId || $[14] !== readingHistory) {
|
|
234
|
+
t5 = {
|
|
223
235
|
fetchNewer,
|
|
224
236
|
newestMessageId,
|
|
225
237
|
readingHistory,
|
|
226
238
|
caughtUp
|
|
227
239
|
};
|
|
228
|
-
$[
|
|
229
|
-
$[
|
|
230
|
-
$[
|
|
231
|
-
$[
|
|
232
|
-
$[
|
|
240
|
+
$[11] = caughtUp;
|
|
241
|
+
$[12] = fetchNewer;
|
|
242
|
+
$[13] = newestMessageId;
|
|
243
|
+
$[14] = readingHistory;
|
|
244
|
+
$[15] = t5;
|
|
233
245
|
} else {
|
|
234
|
-
|
|
246
|
+
t5 = $[15];
|
|
235
247
|
}
|
|
236
248
|
const {
|
|
237
249
|
onSkippedNewMessage
|
|
238
|
-
} = useHeldBackMessages(
|
|
239
|
-
let
|
|
240
|
-
if ($[
|
|
241
|
-
|
|
250
|
+
} = useHeldBackMessages(t5);
|
|
251
|
+
let t6;
|
|
252
|
+
if ($[16] !== conversation_id) {
|
|
253
|
+
t6 = {
|
|
242
254
|
conversationId: conversation_id
|
|
243
255
|
};
|
|
244
|
-
$[
|
|
245
|
-
$[
|
|
256
|
+
$[16] = conversation_id;
|
|
257
|
+
$[17] = t6;
|
|
246
258
|
} else {
|
|
247
|
-
|
|
259
|
+
t6 = $[17];
|
|
248
260
|
}
|
|
249
|
-
useConversationJoltEvents(
|
|
250
|
-
const
|
|
251
|
-
const
|
|
252
|
-
let
|
|
253
|
-
if ($[
|
|
254
|
-
|
|
261
|
+
useConversationJoltEvents(t6);
|
|
262
|
+
const t7 = reply_root_id ?? null;
|
|
263
|
+
const t8 = caughtUp && !readingHistory;
|
|
264
|
+
let t9;
|
|
265
|
+
if ($[18] !== onSkippedNewMessage || $[19] !== queryKey || $[20] !== t8) {
|
|
266
|
+
t9 = gatedMessageCache({
|
|
255
267
|
queryKey,
|
|
256
|
-
acceptNewMessages:
|
|
268
|
+
acceptNewMessages: t8,
|
|
257
269
|
onSkippedNewMessage
|
|
258
270
|
});
|
|
259
|
-
$[
|
|
260
|
-
$[
|
|
261
|
-
$[
|
|
262
|
-
$[
|
|
271
|
+
$[18] = onSkippedNewMessage;
|
|
272
|
+
$[19] = queryKey;
|
|
273
|
+
$[20] = t8;
|
|
274
|
+
$[21] = t9;
|
|
263
275
|
} else {
|
|
264
|
-
|
|
276
|
+
t9 = $[21];
|
|
265
277
|
}
|
|
266
|
-
let
|
|
267
|
-
if ($[
|
|
268
|
-
|
|
278
|
+
let t10;
|
|
279
|
+
if ($[22] !== conversation_id || $[23] !== t7 || $[24] !== t9) {
|
|
280
|
+
t10 = {
|
|
269
281
|
conversationId: conversation_id,
|
|
270
|
-
replyRootId:
|
|
271
|
-
messageCache:
|
|
282
|
+
replyRootId: t7,
|
|
283
|
+
messageCache: t9
|
|
272
284
|
};
|
|
273
|
-
$[
|
|
274
|
-
$[
|
|
275
|
-
$[
|
|
276
|
-
$[
|
|
285
|
+
$[22] = conversation_id;
|
|
286
|
+
$[23] = t7;
|
|
287
|
+
$[24] = t9;
|
|
288
|
+
$[25] = t10;
|
|
277
289
|
} else {
|
|
278
|
-
|
|
290
|
+
t10 = $[25];
|
|
279
291
|
}
|
|
280
|
-
useConversationMessagesJoltEvents(
|
|
292
|
+
useConversationMessagesJoltEvents(t10);
|
|
281
293
|
const {
|
|
282
294
|
markHandledByMessageForm
|
|
283
295
|
} = useVideoModerationJoltEvents();
|
|
284
296
|
useEnsureConversationsRouteExists();
|
|
285
|
-
const
|
|
286
|
-
let
|
|
287
|
-
if ($[
|
|
288
|
-
|
|
297
|
+
const t11 = !behindLatest;
|
|
298
|
+
let t12;
|
|
299
|
+
if ($[26] !== conversation || $[27] !== messages || $[28] !== t11) {
|
|
300
|
+
t12 = {
|
|
289
301
|
conversation,
|
|
290
302
|
messages,
|
|
291
|
-
enabled:
|
|
303
|
+
enabled: t11
|
|
292
304
|
};
|
|
293
|
-
$[
|
|
294
|
-
$[
|
|
295
|
-
$[
|
|
296
|
-
$[
|
|
305
|
+
$[26] = conversation;
|
|
306
|
+
$[27] = messages;
|
|
307
|
+
$[28] = t11;
|
|
308
|
+
$[29] = t12;
|
|
297
309
|
} else {
|
|
298
|
-
|
|
310
|
+
t12 = $[29];
|
|
299
311
|
}
|
|
300
|
-
useMarkLatestMessageRead(
|
|
301
|
-
const
|
|
302
|
-
let
|
|
303
|
-
if ($[
|
|
304
|
-
|
|
312
|
+
useMarkLatestMessageRead(t12);
|
|
313
|
+
const t13 = anchored && caughtUp;
|
|
314
|
+
let t14;
|
|
315
|
+
if ($[30] !== fetchNewer || $[31] !== newestMessageId || $[32] !== t13) {
|
|
316
|
+
t14 = {
|
|
305
317
|
fetchNewer,
|
|
306
318
|
newestMessageId,
|
|
307
|
-
enabled:
|
|
319
|
+
enabled: t13
|
|
308
320
|
};
|
|
309
|
-
$[
|
|
310
|
-
$[
|
|
311
|
-
$[
|
|
312
|
-
$[
|
|
321
|
+
$[30] = fetchNewer;
|
|
322
|
+
$[31] = newestMessageId;
|
|
323
|
+
$[32] = t13;
|
|
324
|
+
$[33] = t14;
|
|
313
325
|
} else {
|
|
314
|
-
|
|
326
|
+
t14 = $[33];
|
|
315
327
|
}
|
|
316
|
-
useFetchNewerOnForeground(
|
|
328
|
+
useFetchNewerOnForeground(t14);
|
|
317
329
|
const noMessages = messages.length === 0;
|
|
318
330
|
const {
|
|
319
331
|
repliesDisabled,
|
|
@@ -323,47 +335,47 @@ function ConversationScreenContent(t0) {
|
|
|
323
335
|
} = conversation;
|
|
324
336
|
const canReply = memberAbility?.canReply;
|
|
325
337
|
const showLeaderDisabledReplyBanner = canReply && repliesDisabled;
|
|
326
|
-
let
|
|
327
|
-
if ($[
|
|
328
|
-
let
|
|
329
|
-
if ($[
|
|
330
|
-
|
|
331
|
-
$[
|
|
332
|
-
$[
|
|
338
|
+
let t15;
|
|
339
|
+
if ($[34] !== editing_message_id || $[35] !== messages) {
|
|
340
|
+
let t16;
|
|
341
|
+
if ($[37] !== editing_message_id) {
|
|
342
|
+
t16 = m => String(m.id) === String(editing_message_id);
|
|
343
|
+
$[37] = editing_message_id;
|
|
344
|
+
$[38] = t16;
|
|
333
345
|
} else {
|
|
334
|
-
|
|
346
|
+
t16 = $[38];
|
|
335
347
|
}
|
|
336
|
-
|
|
337
|
-
$[
|
|
338
|
-
$[
|
|
339
|
-
$[
|
|
348
|
+
t15 = messages.find(t16);
|
|
349
|
+
$[34] = editing_message_id;
|
|
350
|
+
$[35] = messages;
|
|
351
|
+
$[36] = t15;
|
|
340
352
|
} else {
|
|
341
|
-
|
|
353
|
+
t15 = $[36];
|
|
342
354
|
}
|
|
343
|
-
const currentlyEditingMessage =
|
|
344
|
-
let
|
|
345
|
-
if ($[
|
|
346
|
-
|
|
347
|
-
$[
|
|
348
|
-
$[
|
|
355
|
+
const currentlyEditingMessage = t15;
|
|
356
|
+
let t16;
|
|
357
|
+
if ($[39] !== reply_root_author_name) {
|
|
358
|
+
t16 = reply_root_author_name?.split(" ")[0];
|
|
359
|
+
$[39] = reply_root_author_name;
|
|
360
|
+
$[40] = t16;
|
|
349
361
|
} else {
|
|
350
|
-
|
|
362
|
+
t16 = $[40];
|
|
351
363
|
}
|
|
352
|
-
const replyRootAuthorFirstName =
|
|
364
|
+
const replyRootAuthorFirstName = t16;
|
|
353
365
|
const replyHeaderTitle = replyRootAuthorFirstName ? `Reply to ${replyRootAuthorFirstName}` : "Reply";
|
|
354
366
|
const muted = conversation.conversationMembership?.muted ?? conversation.muted;
|
|
355
367
|
const listRef = useRef(null);
|
|
356
368
|
const [hasDragged, setHasDragged] = useState(false);
|
|
357
369
|
const holdListPosition = behindLatest || readingHistory;
|
|
358
|
-
let
|
|
359
|
-
if ($[
|
|
360
|
-
|
|
370
|
+
let t17;
|
|
371
|
+
if ($[41] === Symbol.for("react.memo_cache_sentinel")) {
|
|
372
|
+
t17 = {
|
|
361
373
|
listRef,
|
|
362
374
|
enabled: Platform.OS === "ios"
|
|
363
375
|
};
|
|
364
|
-
$[
|
|
376
|
+
$[41] = t17;
|
|
365
377
|
} else {
|
|
366
|
-
|
|
378
|
+
t17 = $[41];
|
|
367
379
|
}
|
|
368
380
|
const {
|
|
369
381
|
restOffset,
|
|
@@ -371,36 +383,36 @@ function ConversationScreenContent(t0) {
|
|
|
371
383
|
onContentSizeChange,
|
|
372
384
|
onMomentumScrollEnd,
|
|
373
385
|
onScrollEndDrag
|
|
374
|
-
} = useRestAwayFromDismissEdge(
|
|
375
|
-
let
|
|
376
|
-
if ($[
|
|
377
|
-
|
|
386
|
+
} = useRestAwayFromDismissEdge(t17);
|
|
387
|
+
let t18;
|
|
388
|
+
if ($[42] !== restOffset) {
|
|
389
|
+
t18 = () => {
|
|
378
390
|
listRef.current?.scrollToOffset({
|
|
379
391
|
offset: restOffset
|
|
380
392
|
});
|
|
381
393
|
};
|
|
382
|
-
$[
|
|
383
|
-
$[
|
|
394
|
+
$[42] = restOffset;
|
|
395
|
+
$[43] = t18;
|
|
384
396
|
} else {
|
|
385
|
-
|
|
397
|
+
t18 = $[43];
|
|
386
398
|
}
|
|
387
|
-
const handleReturnToBottom =
|
|
388
|
-
let
|
|
389
|
-
if ($[
|
|
390
|
-
|
|
399
|
+
const handleReturnToBottom = t18;
|
|
400
|
+
let t19;
|
|
401
|
+
if ($[44] !== handleReturnToBottom || $[45] !== onExitAnchoredMode) {
|
|
402
|
+
t19 = () => {
|
|
391
403
|
onExitAnchoredMode();
|
|
392
404
|
handleReturnToBottom();
|
|
393
405
|
};
|
|
394
|
-
$[
|
|
395
|
-
$[
|
|
396
|
-
$[
|
|
406
|
+
$[44] = handleReturnToBottom;
|
|
407
|
+
$[45] = onExitAnchoredMode;
|
|
408
|
+
$[46] = t19;
|
|
397
409
|
} else {
|
|
398
|
-
|
|
410
|
+
t19 = $[46];
|
|
399
411
|
}
|
|
400
|
-
const exitAnchoredMode =
|
|
401
|
-
let
|
|
402
|
-
if ($[
|
|
403
|
-
|
|
412
|
+
const exitAnchoredMode = t19;
|
|
413
|
+
let t20;
|
|
414
|
+
if ($[47] !== anchored || $[48] !== exitAnchoredMode || $[49] !== handleReturnToBottom) {
|
|
415
|
+
t20 = () => {
|
|
404
416
|
setShowJumpToBottomButton(false);
|
|
405
417
|
if (anchored) {
|
|
406
418
|
exitAnchoredMode();
|
|
@@ -408,45 +420,45 @@ function ConversationScreenContent(t0) {
|
|
|
408
420
|
handleReturnToBottom();
|
|
409
421
|
}
|
|
410
422
|
};
|
|
411
|
-
$[
|
|
412
|
-
$[
|
|
413
|
-
$[
|
|
414
|
-
$[
|
|
423
|
+
$[47] = anchored;
|
|
424
|
+
$[48] = exitAnchoredMode;
|
|
425
|
+
$[49] = handleReturnToBottom;
|
|
426
|
+
$[50] = t20;
|
|
415
427
|
} else {
|
|
416
|
-
|
|
428
|
+
t20 = $[50];
|
|
417
429
|
}
|
|
418
|
-
const jumpToLatest =
|
|
419
|
-
let
|
|
420
|
-
if ($[
|
|
421
|
-
|
|
430
|
+
const jumpToLatest = t20;
|
|
431
|
+
let t21;
|
|
432
|
+
if ($[51] === Symbol.for("react.memo_cache_sentinel")) {
|
|
433
|
+
t21 = event => {
|
|
422
434
|
const offsetY = event.nativeEvent.contentOffset.y;
|
|
423
435
|
setShowJumpToBottomButton(offsetY > 200);
|
|
424
436
|
};
|
|
425
|
-
$[
|
|
437
|
+
$[51] = t21;
|
|
426
438
|
} else {
|
|
427
|
-
|
|
439
|
+
t21 = $[51];
|
|
428
440
|
}
|
|
429
|
-
const trackScroll =
|
|
430
|
-
let
|
|
431
|
-
if ($[
|
|
432
|
-
|
|
441
|
+
const trackScroll = t21;
|
|
442
|
+
let t22;
|
|
443
|
+
if ($[52] !== fetchPreviousPage || $[53] !== hasPreviousPage || $[54] !== isFetchingPreviousPage) {
|
|
444
|
+
t22 = () => {
|
|
433
445
|
if (!hasPreviousPage || isFetchingPreviousPage) {
|
|
434
446
|
return;
|
|
435
447
|
}
|
|
436
448
|
setHasDragged(false);
|
|
437
449
|
fetchPreviousPage();
|
|
438
450
|
};
|
|
439
|
-
$[
|
|
440
|
-
$[
|
|
441
|
-
$[
|
|
442
|
-
$[
|
|
451
|
+
$[52] = fetchPreviousPage;
|
|
452
|
+
$[53] = hasPreviousPage;
|
|
453
|
+
$[54] = isFetchingPreviousPage;
|
|
454
|
+
$[55] = t22;
|
|
443
455
|
} else {
|
|
444
|
-
|
|
456
|
+
t22 = $[55];
|
|
445
457
|
}
|
|
446
|
-
const loadNewerMessages =
|
|
447
|
-
let
|
|
448
|
-
if ($[
|
|
449
|
-
|
|
458
|
+
const loadNewerMessages = t22;
|
|
459
|
+
let t23;
|
|
460
|
+
if ($[56] !== badges?.[0] || $[57] !== conversation.deleted || $[58] !== muted || $[59] !== navigation || $[60] !== replyHeaderTitle || $[61] !== reply_root_id || $[62] !== title) {
|
|
461
|
+
t23 = () => {
|
|
450
462
|
if (reply_root_id) {
|
|
451
463
|
navigation.setParams({
|
|
452
464
|
title: replyHeaderTitle
|
|
@@ -460,86 +472,86 @@ function ConversationScreenContent(t0) {
|
|
|
460
472
|
});
|
|
461
473
|
}
|
|
462
474
|
};
|
|
463
|
-
$[
|
|
464
|
-
$[
|
|
465
|
-
$[
|
|
466
|
-
$[
|
|
467
|
-
$[
|
|
468
|
-
$[
|
|
469
|
-
$[
|
|
470
|
-
$[
|
|
471
|
-
} else {
|
|
472
|
-
|
|
473
|
-
}
|
|
474
|
-
const
|
|
475
|
-
let
|
|
476
|
-
if ($[
|
|
477
|
-
|
|
478
|
-
$[
|
|
479
|
-
$[
|
|
480
|
-
$[
|
|
481
|
-
$[
|
|
482
|
-
$[
|
|
483
|
-
$[
|
|
484
|
-
$[
|
|
485
|
-
$[
|
|
486
|
-
} else {
|
|
487
|
-
|
|
488
|
-
}
|
|
489
|
-
useEffect(
|
|
475
|
+
$[56] = badges?.[0];
|
|
476
|
+
$[57] = conversation.deleted;
|
|
477
|
+
$[58] = muted;
|
|
478
|
+
$[59] = navigation;
|
|
479
|
+
$[60] = replyHeaderTitle;
|
|
480
|
+
$[61] = reply_root_id;
|
|
481
|
+
$[62] = title;
|
|
482
|
+
$[63] = t23;
|
|
483
|
+
} else {
|
|
484
|
+
t23 = $[63];
|
|
485
|
+
}
|
|
486
|
+
const t24 = conversation?.deleted;
|
|
487
|
+
let t25;
|
|
488
|
+
if ($[64] !== badges || $[65] !== muted || $[66] !== navigation || $[67] !== replyHeaderTitle || $[68] !== reply_root_id || $[69] !== t24 || $[70] !== title) {
|
|
489
|
+
t25 = [navigation, title, badges, t24, reply_root_id, replyHeaderTitle, muted];
|
|
490
|
+
$[64] = badges;
|
|
491
|
+
$[65] = muted;
|
|
492
|
+
$[66] = navigation;
|
|
493
|
+
$[67] = replyHeaderTitle;
|
|
494
|
+
$[68] = reply_root_id;
|
|
495
|
+
$[69] = t24;
|
|
496
|
+
$[70] = title;
|
|
497
|
+
$[71] = t25;
|
|
498
|
+
} else {
|
|
499
|
+
t25 = $[71];
|
|
500
|
+
}
|
|
501
|
+
useEffect(t23, t25);
|
|
490
502
|
if (!conversation || conversation.deleted) {
|
|
491
|
-
let
|
|
492
|
-
if ($[
|
|
493
|
-
|
|
503
|
+
let t26;
|
|
504
|
+
if ($[72] === Symbol.for("react.memo_cache_sentinel")) {
|
|
505
|
+
t26 = /*#__PURE__*/_jsx(BlankState.Imagery, {
|
|
494
506
|
name: "general.outlinedTextMessage"
|
|
495
507
|
});
|
|
496
|
-
$[
|
|
508
|
+
$[72] = t26;
|
|
497
509
|
} else {
|
|
498
|
-
|
|
510
|
+
t26 = $[72];
|
|
499
511
|
}
|
|
500
|
-
let
|
|
501
|
-
if ($[
|
|
502
|
-
|
|
512
|
+
let t27;
|
|
513
|
+
if ($[73] === Symbol.for("react.memo_cache_sentinel")) {
|
|
514
|
+
t27 = /*#__PURE__*/_jsx(BlankState.Content, {
|
|
503
515
|
children: /*#__PURE__*/_jsx(BlankState.Heading, {
|
|
504
516
|
children: "This conversation has been deleted"
|
|
505
517
|
})
|
|
506
518
|
});
|
|
507
|
-
$[
|
|
519
|
+
$[73] = t27;
|
|
508
520
|
} else {
|
|
509
|
-
|
|
521
|
+
t27 = $[73];
|
|
510
522
|
}
|
|
511
|
-
let
|
|
512
|
-
if ($[
|
|
513
|
-
|
|
514
|
-
children: [
|
|
523
|
+
let t28;
|
|
524
|
+
if ($[74] !== navigation.goBack) {
|
|
525
|
+
t28 = /*#__PURE__*/_jsxs(BlankState.Root, {
|
|
526
|
+
children: [t26, t27, /*#__PURE__*/_jsx(BlankState.Button, {
|
|
515
527
|
onPress: navigation.goBack,
|
|
516
528
|
title: "Back to conversations",
|
|
517
529
|
accessibilityHint: "Navigates back to the conversations list",
|
|
518
530
|
accessibilityRole: "link"
|
|
519
531
|
})]
|
|
520
532
|
});
|
|
521
|
-
$[
|
|
522
|
-
$[
|
|
533
|
+
$[74] = navigation.goBack;
|
|
534
|
+
$[75] = t28;
|
|
523
535
|
} else {
|
|
524
|
-
|
|
536
|
+
t28 = $[75];
|
|
525
537
|
}
|
|
526
|
-
let
|
|
527
|
-
if ($[
|
|
528
|
-
|
|
538
|
+
let t29;
|
|
539
|
+
if ($[76] !== styles.container || $[77] !== t28) {
|
|
540
|
+
t29 = /*#__PURE__*/_jsx(View, {
|
|
529
541
|
style: styles.container,
|
|
530
|
-
children:
|
|
542
|
+
children: t28
|
|
531
543
|
});
|
|
532
|
-
$[
|
|
533
|
-
$[
|
|
534
|
-
$[
|
|
544
|
+
$[76] = styles.container;
|
|
545
|
+
$[77] = t28;
|
|
546
|
+
$[78] = t29;
|
|
535
547
|
} else {
|
|
536
|
-
|
|
548
|
+
t29 = $[78];
|
|
537
549
|
}
|
|
538
|
-
return
|
|
550
|
+
return t29;
|
|
539
551
|
}
|
|
540
|
-
let
|
|
541
|
-
if ($[
|
|
542
|
-
|
|
552
|
+
let t26;
|
|
553
|
+
if ($[79] !== anchor || $[80] !== anchored || $[81] !== conversation || $[82] !== conversation_id || $[83] !== fetchNextPage || $[84] !== hasDragged || $[85] !== hasNextPage || $[86] !== holdListPosition || $[87] !== loadNewerMessages || $[88] !== messages || $[89] !== noMessages || $[90] !== onContentSizeChange || $[91] !== onLayout || $[92] !== onMomentumScrollEnd || $[93] !== onScrollEndDrag || $[94] !== reply_root_id || $[95] !== styles.emptyState) {
|
|
554
|
+
t26 = noMessages ? /*#__PURE__*/_jsx(View, {
|
|
543
555
|
style: styles.emptyState,
|
|
544
556
|
children: /*#__PURE__*/_jsx(ConversationStartBanner, {
|
|
545
557
|
conversation: conversation,
|
|
@@ -566,59 +578,59 @@ function ConversationScreenContent(t0) {
|
|
|
566
578
|
minIndexForVisible: 0
|
|
567
579
|
} : undefined
|
|
568
580
|
});
|
|
569
|
-
$[
|
|
570
|
-
$[
|
|
571
|
-
$[
|
|
572
|
-
$[
|
|
573
|
-
$[
|
|
574
|
-
$[
|
|
575
|
-
$[
|
|
576
|
-
$[
|
|
577
|
-
$[
|
|
578
|
-
$[
|
|
579
|
-
$[
|
|
580
|
-
$[
|
|
581
|
-
$[
|
|
582
|
-
$[
|
|
583
|
-
$[
|
|
584
|
-
$[
|
|
585
|
-
$[
|
|
586
|
-
$[93] = t24;
|
|
587
|
-
} else {
|
|
588
|
-
t24 = $[93];
|
|
589
|
-
}
|
|
590
|
-
const t25 = behindLatest || showJumpToBottomButton;
|
|
591
|
-
let t26;
|
|
592
|
-
if ($[94] !== jumpToLatest || $[95] !== t25) {
|
|
593
|
-
t26 = /*#__PURE__*/_jsx(JumpToBottomButton, {
|
|
594
|
-
onPress: jumpToLatest,
|
|
595
|
-
visible: t25
|
|
596
|
-
});
|
|
597
|
-
$[94] = jumpToLatest;
|
|
598
|
-
$[95] = t25;
|
|
581
|
+
$[79] = anchor;
|
|
582
|
+
$[80] = anchored;
|
|
583
|
+
$[81] = conversation;
|
|
584
|
+
$[82] = conversation_id;
|
|
585
|
+
$[83] = fetchNextPage;
|
|
586
|
+
$[84] = hasDragged;
|
|
587
|
+
$[85] = hasNextPage;
|
|
588
|
+
$[86] = holdListPosition;
|
|
589
|
+
$[87] = loadNewerMessages;
|
|
590
|
+
$[88] = messages;
|
|
591
|
+
$[89] = noMessages;
|
|
592
|
+
$[90] = onContentSizeChange;
|
|
593
|
+
$[91] = onLayout;
|
|
594
|
+
$[92] = onMomentumScrollEnd;
|
|
595
|
+
$[93] = onScrollEndDrag;
|
|
596
|
+
$[94] = reply_root_id;
|
|
597
|
+
$[95] = styles.emptyState;
|
|
599
598
|
$[96] = t26;
|
|
600
599
|
} else {
|
|
601
600
|
t26 = $[96];
|
|
602
601
|
}
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
602
|
+
const t27 = behindLatest || showJumpToBottomButton;
|
|
603
|
+
let t28;
|
|
604
|
+
if ($[97] !== jumpToLatest || $[98] !== t27) {
|
|
605
|
+
t28 = /*#__PURE__*/_jsx(JumpToBottomButton, {
|
|
606
|
+
onPress: jumpToLatest,
|
|
607
|
+
visible: t27
|
|
608
|
+
});
|
|
609
|
+
$[97] = jumpToLatest;
|
|
607
610
|
$[98] = t27;
|
|
611
|
+
$[99] = t28;
|
|
608
612
|
} else {
|
|
609
|
-
|
|
613
|
+
t28 = $[99];
|
|
610
614
|
}
|
|
611
|
-
let
|
|
612
|
-
if ($[
|
|
613
|
-
|
|
614
|
-
$[
|
|
615
|
-
$[
|
|
615
|
+
let t29;
|
|
616
|
+
if ($[100] !== noMessages) {
|
|
617
|
+
t29 = !noMessages && /*#__PURE__*/_jsx(TypingIndicator, {});
|
|
618
|
+
$[100] = noMessages;
|
|
619
|
+
$[101] = t29;
|
|
616
620
|
} else {
|
|
617
|
-
|
|
621
|
+
t29 = $[101];
|
|
618
622
|
}
|
|
619
|
-
let
|
|
620
|
-
if ($[
|
|
621
|
-
|
|
623
|
+
let t30;
|
|
624
|
+
if ($[102] !== showLeaderDisabledReplyBanner) {
|
|
625
|
+
t30 = showLeaderDisabledReplyBanner && /*#__PURE__*/_jsx(LeaderMessagesDisabledBanner, {});
|
|
626
|
+
$[102] = showLeaderDisabledReplyBanner;
|
|
627
|
+
$[103] = t30;
|
|
628
|
+
} else {
|
|
629
|
+
t30 = $[103];
|
|
630
|
+
}
|
|
631
|
+
let t31;
|
|
632
|
+
if ($[104] !== canReply || $[105] !== conversation || $[106] !== currentlyEditingMessage || $[107] !== jumpToLatest || $[108] !== markHandledByMessageForm || $[109] !== replyRootAuthorFirstName || $[110] !== reply_root_id) {
|
|
633
|
+
t31 = /*#__PURE__*/_jsx(ConversationBottomBar, {
|
|
622
634
|
conversation: conversation,
|
|
623
635
|
canReply: canReply,
|
|
624
636
|
replyRootAuthorFirstName: replyRootAuthorFirstName,
|
|
@@ -627,44 +639,44 @@ function ConversationScreenContent(t0) {
|
|
|
627
639
|
onFlaggedInMessageForm: markHandledByMessageForm,
|
|
628
640
|
onBeforeSubmit: jumpToLatest
|
|
629
641
|
});
|
|
630
|
-
$[
|
|
631
|
-
$[
|
|
632
|
-
$[
|
|
633
|
-
$[
|
|
634
|
-
$[
|
|
635
|
-
$[
|
|
636
|
-
$[
|
|
637
|
-
$[
|
|
638
|
-
} else {
|
|
639
|
-
|
|
640
|
-
}
|
|
641
|
-
let
|
|
642
|
-
if ($[
|
|
643
|
-
|
|
644
|
-
children: [
|
|
642
|
+
$[104] = canReply;
|
|
643
|
+
$[105] = conversation;
|
|
644
|
+
$[106] = currentlyEditingMessage;
|
|
645
|
+
$[107] = jumpToLatest;
|
|
646
|
+
$[108] = markHandledByMessageForm;
|
|
647
|
+
$[109] = replyRootAuthorFirstName;
|
|
648
|
+
$[110] = reply_root_id;
|
|
649
|
+
$[111] = t31;
|
|
650
|
+
} else {
|
|
651
|
+
t31 = $[111];
|
|
652
|
+
}
|
|
653
|
+
let t32;
|
|
654
|
+
if ($[112] !== t26 || $[113] !== t28 || $[114] !== t29 || $[115] !== t30 || $[116] !== t31) {
|
|
655
|
+
t32 = /*#__PURE__*/_jsxs(KeyboardView, {
|
|
656
|
+
children: [t26, t28, t29, t30, t31]
|
|
645
657
|
});
|
|
646
|
-
$[
|
|
647
|
-
$[
|
|
648
|
-
$[
|
|
649
|
-
$[
|
|
650
|
-
$[
|
|
651
|
-
$[
|
|
652
|
-
} else {
|
|
653
|
-
|
|
654
|
-
}
|
|
655
|
-
let
|
|
656
|
-
if ($[
|
|
657
|
-
|
|
658
|
+
$[112] = t26;
|
|
659
|
+
$[113] = t28;
|
|
660
|
+
$[114] = t29;
|
|
661
|
+
$[115] = t30;
|
|
662
|
+
$[116] = t31;
|
|
663
|
+
$[117] = t32;
|
|
664
|
+
} else {
|
|
665
|
+
t32 = $[117];
|
|
666
|
+
}
|
|
667
|
+
let t33;
|
|
668
|
+
if ($[118] !== styles.container || $[119] !== t32) {
|
|
669
|
+
t33 = /*#__PURE__*/_jsx(View, {
|
|
658
670
|
style: styles.container,
|
|
659
|
-
children:
|
|
671
|
+
children: t32
|
|
660
672
|
});
|
|
661
|
-
$[
|
|
662
|
-
$[
|
|
663
|
-
$[
|
|
673
|
+
$[118] = styles.container;
|
|
674
|
+
$[119] = t32;
|
|
675
|
+
$[120] = t33;
|
|
664
676
|
} else {
|
|
665
|
-
|
|
677
|
+
t33 = $[120];
|
|
666
678
|
}
|
|
667
|
-
return
|
|
679
|
+
return t33;
|
|
668
680
|
}
|
|
669
681
|
function ConversationBottomBar(t0) {
|
|
670
682
|
const $ = _c(16);
|