@planningcenter/chat-react-native 4.2.0-rc.0 → 4.2.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/build/components/conversation/message.d.ts +3 -2
  2. package/build/components/conversation/message.d.ts.map +1 -1
  3. package/build/components/conversation/message.js +23 -22
  4. package/build/components/conversation/message.js.map +1 -1
  5. package/build/components/conversation/message_list.d.ts +21 -0
  6. package/build/components/conversation/message_list.d.ts.map +1 -0
  7. package/build/components/conversation/message_list.js +273 -0
  8. package/build/components/conversation/message_list.js.map +1 -0
  9. package/build/components/conversation/message_read_receipts.d.ts +2 -4
  10. package/build/components/conversation/message_read_receipts.d.ts.map +1 -1
  11. package/build/components/conversation/message_read_receipts.js +2 -3
  12. package/build/components/conversation/message_read_receipts.js.map +1 -1
  13. package/build/components/conversation/reply_shadow_message.d.ts +2 -1
  14. package/build/components/conversation/reply_shadow_message.d.ts.map +1 -1
  15. package/build/components/conversation/reply_shadow_message.js +47 -46
  16. package/build/components/conversation/reply_shadow_message.js.map +1 -1
  17. package/build/hooks/use_conversation_messages.d.ts.map +1 -1
  18. package/build/hooks/use_conversation_messages.js +40 -28
  19. package/build/hooks/use_conversation_messages.js.map +1 -1
  20. package/build/hooks/use_conversation_messages_jolt_events.d.ts.map +1 -1
  21. package/build/hooks/use_conversation_messages_jolt_events.js +6 -1
  22. package/build/hooks/use_conversation_messages_jolt_events.js.map +1 -1
  23. package/build/screens/conversation_screen.d.ts.map +1 -1
  24. package/build/screens/conversation_screen.js +184 -365
  25. package/build/screens/conversation_screen.js.map +1 -1
  26. package/build/types/resources/message.d.ts +1 -0
  27. package/build/types/resources/message.d.ts.map +1 -1
  28. package/build/types/resources/message.js.map +1 -1
  29. package/build/utils/cache/messages_cache.d.ts +1 -0
  30. package/build/utils/cache/messages_cache.d.ts.map +1 -1
  31. package/build/utils/cache/messages_cache.js +10 -1
  32. package/build/utils/cache/messages_cache.js.map +1 -1
  33. package/build/utils/client/transform_response.d.ts.map +1 -1
  34. package/build/utils/client/transform_response.js +9 -5
  35. package/build/utils/client/transform_response.js.map +1 -1
  36. package/build/utils/group_messages.d.ts +1 -0
  37. package/build/utils/group_messages.d.ts.map +1 -1
  38. package/build/utils/group_messages.js +10 -1
  39. package/build/utils/group_messages.js.map +1 -1
  40. package/build/utils/replace_equal_by_id.d.ts +6 -0
  41. package/build/utils/replace_equal_by_id.d.ts.map +1 -0
  42. package/build/utils/replace_equal_by_id.js +41 -0
  43. package/build/utils/replace_equal_by_id.js.map +1 -0
  44. package/build/utils/request/messages_data_options.d.ts.map +1 -1
  45. package/build/utils/request/messages_data_options.js +1 -1
  46. package/build/utils/request/messages_data_options.js.map +1 -1
  47. package/package.json +2 -2
  48. package/src/components/conversation/__tests__/message_list.test.tsx +277 -0
  49. package/src/components/conversation/__tests__/reply_shadow_message.test.tsx +119 -0
  50. package/src/components/conversation/message.tsx +15 -18
  51. package/src/components/conversation/message_list.tsx +157 -0
  52. package/src/components/conversation/message_read_receipts.tsx +3 -5
  53. package/src/components/conversation/reply_shadow_message.tsx +9 -7
  54. package/src/hooks/use_conversation_messages.ts +5 -1
  55. package/src/hooks/use_conversation_messages_jolt_events.ts +7 -0
  56. package/src/screens/conversation_screen.tsx +11 -104
  57. package/src/types/resources/message.ts +1 -0
  58. package/src/utils/__tests__/group_messages.test.ts +48 -0
  59. package/src/utils/__tests__/replace_equal_by_id.test.ts +73 -0
  60. package/src/utils/cache/__tests__/messages_cache_reply_roots.test.ts +70 -0
  61. package/src/utils/cache/messages_cache.ts +21 -1
  62. package/src/utils/client/__tests__/transform_response.test.ts +62 -0
  63. package/src/utils/client/transform_response.ts +7 -5
  64. package/src/utils/group_messages.ts +18 -1
  65. package/src/utils/replace_equal_by_id.ts +42 -0
  66. package/src/utils/request/messages_data_options.ts +1 -1
@@ -1,24 +1,20 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
- import { date as formatDate } from '@planningcenter/datetime-fmt';
3
2
  import { HeaderTitle, PlatformPressable } from '@react-navigation/elements';
4
3
  import { CommonActions, useNavigation, useTheme as useNavigationTheme, useRoute } from '@react-navigation/native';
5
4
  import React, { useCallback, useEffect, useRef, useState } from 'react';
6
- import { FlatList, Platform, StyleSheet, useWindowDimensions, View } from 'react-native';
5
+ import { Platform, StyleSheet, useWindowDimensions, View } from 'react-native';
7
6
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
8
- import { Badge, Icon, Text } from '../components';
7
+ import { Badge, Icon } from '../components';
9
8
  import { ConversationStartBanner } from '../components/conversation/conversation_start_banner';
10
9
  import { JumpToBottomButton } from '../components/conversation/jump_to_bottom_button';
11
- import { Message } from '../components/conversation/message';
12
10
  import { MessageForm } from '../components/conversation/message_form';
11
+ import { MessageList } from '../components/conversation/message_list';
13
12
  import { ConversationDisabledBanner, LeaderMessagesDisabledBanner, MemberMessagesDisabledBanner } from '../components/conversation/messages_disabled_banners';
14
- import { ReplyShadowMessage } from '../components/conversation/reply_shadow_message';
15
- import { SystemMessage } from '../components/conversation/system_message';
16
13
  import { TypingIndicator } from '../components/conversation/typing_indicator';
17
14
  import { KeyboardView } from '../components/display/keyboard_view';
18
15
  import { useHeaderSlotReserve } from '../components/display/platform_modal_header_buttons';
19
16
  import BlankState from '../components/primitive/blank_state_primitive';
20
17
  import { ConversationContextProvider } from '../contexts/conversation_context';
21
- import { useTheme } from '../hooks';
22
18
  import { useMessageAvailableMembersAction } from '../hooks/direct_messages/use_message_available_members_action';
23
19
  import { useConversation } from '../hooks/use_conversation';
24
20
  import { useConversationJoltEvents } from '../hooks/use_conversation_jolt_events';
@@ -28,10 +24,6 @@ import { useMarkLatestMessageRead } from '../hooks/use_mark_latest_message_read'
28
24
  import { analyticsEvents, normalizeAnalyticsMetadata, usePublishProductAnalyticsEvent } from '../hooks/use_product_analytics';
29
25
  import { useRestAwayFromDismissEdge } from '../hooks/use_rest_away_from_dismiss_edge';
30
26
  import { useVideoModerationJoltEvents } from '../hooks/use_video_moderation_jolt_events';
31
- import { getRelativeDateStatus } from '../utils/date';
32
- import { groupMessages } from '../utils/group_messages';
33
- import { CONVERSATION_MESSAGE_LIST_PADDING_HORIZONTAL } from '../utils/styles';
34
- import { isSystemMessage } from '../utils/system_messages';
35
27
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
36
28
  export function ConversationScreen(t0) {
37
29
  const $ = _c(13);
@@ -104,7 +96,7 @@ export function ConversationScreen(t0) {
104
96
  return t6;
105
97
  }
106
98
  function ConversationScreenContent(t0) {
107
- const $ = _c(86);
99
+ const $ = _c(80);
108
100
  const {
109
101
  route
110
102
  } = t0;
@@ -175,21 +167,7 @@ function ConversationScreenContent(t0) {
175
167
  t4 = $[9];
176
168
  }
177
169
  useMarkLatestMessageRead(t4);
178
- const t5 = !!reply_root_id;
179
- let t6;
180
- if ($[10] !== messages || $[11] !== t5) {
181
- t6 = groupMessages({
182
- ms: messages,
183
- inReplyScreen: t5
184
- });
185
- $[10] = messages;
186
- $[11] = t5;
187
- $[12] = t6;
188
- } else {
189
- t6 = $[12];
190
- }
191
- const messagesWithSeparators = t6;
192
- const noMessages = messagesWithSeparators.length === 0;
170
+ const noMessages = messages.length === 0;
193
171
  const {
194
172
  repliesDisabled,
195
173
  memberAbility,
@@ -198,58 +176,57 @@ function ConversationScreenContent(t0) {
198
176
  } = conversation;
199
177
  const canReply = memberAbility?.canReply;
200
178
  const showLeaderDisabledReplyBanner = canReply && repliesDisabled;
201
- const canDeleteNonAuthoredMessages = memberAbility?.canDeleteNonAuthoredMessages ?? false;
202
- let t7;
203
- if ($[13] !== editing_message_id || $[14] !== messages) {
204
- let t8;
205
- if ($[16] !== editing_message_id) {
206
- t8 = m => String(m.id) === String(editing_message_id);
207
- $[16] = editing_message_id;
208
- $[17] = t8;
179
+ let t5;
180
+ if ($[10] !== editing_message_id || $[11] !== messages) {
181
+ let t6;
182
+ if ($[13] !== editing_message_id) {
183
+ t6 = m => String(m.id) === String(editing_message_id);
184
+ $[13] = editing_message_id;
185
+ $[14] = t6;
209
186
  } else {
210
- t8 = $[17];
187
+ t6 = $[14];
211
188
  }
212
- t7 = messages.find(t8);
213
- $[13] = editing_message_id;
214
- $[14] = messages;
215
- $[15] = t7;
189
+ t5 = messages.find(t6);
190
+ $[10] = editing_message_id;
191
+ $[11] = messages;
192
+ $[12] = t5;
216
193
  } else {
217
- t7 = $[15];
194
+ t5 = $[12];
218
195
  }
219
- const currentlyEditingMessage = t7;
220
- let t8;
221
- if ($[18] !== reply_root_author_name) {
222
- t8 = reply_root_author_name?.split(" ")[0];
223
- $[18] = reply_root_author_name;
224
- $[19] = t8;
196
+ const currentlyEditingMessage = t5;
197
+ let t6;
198
+ if ($[15] !== reply_root_author_name) {
199
+ t6 = reply_root_author_name?.split(" ")[0];
200
+ $[15] = reply_root_author_name;
201
+ $[16] = t6;
225
202
  } else {
226
- t8 = $[19];
203
+ t6 = $[16];
227
204
  }
228
- const replyRootAuthorFirstName = t8;
205
+ const replyRootAuthorFirstName = t6;
229
206
  const replyHeaderTitle = replyRootAuthorFirstName ? `Reply to ${replyRootAuthorFirstName}` : "Reply";
230
207
  const muted = conversation.conversationMembership?.muted ?? conversation.muted;
231
208
  const listRef = useRef(null);
232
209
  const [showJumpToBottomButton, setShowJumpToBottomButton] = useState(false);
233
- let t9;
234
- if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
235
- t9 = event => {
210
+ let t7;
211
+ if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
212
+ t7 = event => {
236
213
  const offsetY = event.nativeEvent.contentOffset.y;
237
214
  setShowJumpToBottomButton(offsetY > 200);
238
215
  };
239
- $[20] = t9;
216
+ $[17] = t7;
240
217
  } else {
241
- t9 = $[20];
218
+ t7 = $[17];
242
219
  }
243
- const trackScroll = t9;
244
- let t10;
245
- if ($[21] === Symbol.for("react.memo_cache_sentinel")) {
246
- t10 = {
220
+ const trackScroll = t7;
221
+ let t8;
222
+ if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
223
+ t8 = {
247
224
  listRef,
248
225
  enabled: Platform.OS === "ios"
249
226
  };
250
- $[21] = t10;
227
+ $[18] = t8;
251
228
  } else {
252
- t10 = $[21];
229
+ t8 = $[18];
253
230
  }
254
231
  const {
255
232
  restOffset,
@@ -257,23 +234,23 @@ function ConversationScreenContent(t0) {
257
234
  onContentSizeChange,
258
235
  onMomentumScrollEnd,
259
236
  onScrollEndDrag
260
- } = useRestAwayFromDismissEdge(t10);
261
- let t11;
262
- if ($[22] !== restOffset) {
263
- t11 = () => {
237
+ } = useRestAwayFromDismissEdge(t8);
238
+ let t9;
239
+ if ($[19] !== restOffset) {
240
+ t9 = () => {
264
241
  listRef.current?.scrollToOffset({
265
242
  offset: restOffset
266
243
  });
267
244
  };
268
- $[22] = restOffset;
269
- $[23] = t11;
245
+ $[19] = restOffset;
246
+ $[20] = t9;
270
247
  } else {
271
- t11 = $[23];
248
+ t9 = $[20];
272
249
  }
273
- const handleReturnToBottom = t11;
274
- let t12;
275
- if ($[24] !== badges?.[0] || $[25] !== conversation.deleted || $[26] !== muted || $[27] !== navigation || $[28] !== replyHeaderTitle || $[29] !== reply_root_id || $[30] !== title) {
276
- t12 = () => {
250
+ const handleReturnToBottom = t9;
251
+ let t10;
252
+ if ($[21] !== badges?.[0] || $[22] !== conversation.deleted || $[23] !== muted || $[24] !== navigation || $[25] !== replyHeaderTitle || $[26] !== reply_root_id || $[27] !== title) {
253
+ t10 = () => {
277
254
  if (reply_root_id) {
278
255
  navigation.setParams({
279
256
  title: replyHeaderTitle
@@ -287,192 +264,152 @@ function ConversationScreenContent(t0) {
287
264
  });
288
265
  }
289
266
  };
290
- $[24] = badges?.[0];
291
- $[25] = conversation.deleted;
292
- $[26] = muted;
293
- $[27] = navigation;
294
- $[28] = replyHeaderTitle;
295
- $[29] = reply_root_id;
296
- $[30] = title;
297
- $[31] = t12;
298
- } else {
299
- t12 = $[31];
300
- }
301
- const t13 = conversation?.deleted;
302
- let t14;
303
- if ($[32] !== badges || $[33] !== muted || $[34] !== navigation || $[35] !== replyHeaderTitle || $[36] !== reply_root_id || $[37] !== t13 || $[38] !== title) {
304
- t14 = [navigation, title, badges, t13, reply_root_id, replyHeaderTitle, muted];
305
- $[32] = badges;
306
- $[33] = muted;
307
- $[34] = navigation;
308
- $[35] = replyHeaderTitle;
309
- $[36] = reply_root_id;
310
- $[37] = t13;
311
- $[38] = title;
312
- $[39] = t14;
313
- } else {
314
- t14 = $[39];
315
- }
316
- useEffect(t12, t14);
267
+ $[21] = badges?.[0];
268
+ $[22] = conversation.deleted;
269
+ $[23] = muted;
270
+ $[24] = navigation;
271
+ $[25] = replyHeaderTitle;
272
+ $[26] = reply_root_id;
273
+ $[27] = title;
274
+ $[28] = t10;
275
+ } else {
276
+ t10 = $[28];
277
+ }
278
+ const t11 = conversation?.deleted;
279
+ let t12;
280
+ if ($[29] !== badges || $[30] !== muted || $[31] !== navigation || $[32] !== replyHeaderTitle || $[33] !== reply_root_id || $[34] !== t11 || $[35] !== title) {
281
+ t12 = [navigation, title, badges, t11, reply_root_id, replyHeaderTitle, muted];
282
+ $[29] = badges;
283
+ $[30] = muted;
284
+ $[31] = navigation;
285
+ $[32] = replyHeaderTitle;
286
+ $[33] = reply_root_id;
287
+ $[34] = t11;
288
+ $[35] = title;
289
+ $[36] = t12;
290
+ } else {
291
+ t12 = $[36];
292
+ }
293
+ useEffect(t10, t12);
317
294
  if (!conversation || conversation.deleted) {
318
- let t15;
319
- if ($[40] === Symbol.for("react.memo_cache_sentinel")) {
320
- t15 = /*#__PURE__*/_jsx(BlankState.Imagery, {
295
+ let t13;
296
+ if ($[37] === Symbol.for("react.memo_cache_sentinel")) {
297
+ t13 = /*#__PURE__*/_jsx(BlankState.Imagery, {
321
298
  name: "general.outlinedTextMessage"
322
299
  });
323
- $[40] = t15;
300
+ $[37] = t13;
324
301
  } else {
325
- t15 = $[40];
302
+ t13 = $[37];
326
303
  }
327
- let t16;
328
- if ($[41] === Symbol.for("react.memo_cache_sentinel")) {
329
- t16 = /*#__PURE__*/_jsx(BlankState.Content, {
304
+ let t14;
305
+ if ($[38] === Symbol.for("react.memo_cache_sentinel")) {
306
+ t14 = /*#__PURE__*/_jsx(BlankState.Content, {
330
307
  children: /*#__PURE__*/_jsx(BlankState.Heading, {
331
308
  children: "This conversation has been deleted"
332
309
  })
333
310
  });
334
- $[41] = t16;
311
+ $[38] = t14;
335
312
  } else {
336
- t16 = $[41];
313
+ t14 = $[38];
337
314
  }
338
- let t17;
339
- if ($[42] !== navigation.goBack) {
340
- t17 = /*#__PURE__*/_jsxs(BlankState.Root, {
341
- children: [t15, t16, /*#__PURE__*/_jsx(BlankState.Button, {
315
+ let t15;
316
+ if ($[39] !== navigation.goBack) {
317
+ t15 = /*#__PURE__*/_jsxs(BlankState.Root, {
318
+ children: [t13, t14, /*#__PURE__*/_jsx(BlankState.Button, {
342
319
  onPress: navigation.goBack,
343
320
  title: "Back to conversations",
344
321
  accessibilityHint: "Navigates back to the conversations list",
345
322
  accessibilityRole: "link"
346
323
  })]
347
324
  });
348
- $[42] = navigation.goBack;
349
- $[43] = t17;
325
+ $[39] = navigation.goBack;
326
+ $[40] = t15;
350
327
  } else {
351
- t17 = $[43];
328
+ t15 = $[40];
352
329
  }
353
- let t18;
354
- if ($[44] !== styles.container || $[45] !== t17) {
355
- t18 = /*#__PURE__*/_jsx(View, {
330
+ let t16;
331
+ if ($[41] !== styles.container || $[42] !== t15) {
332
+ t16 = /*#__PURE__*/_jsx(View, {
356
333
  style: styles.container,
357
- children: t17
334
+ children: t15
358
335
  });
359
- $[44] = styles.container;
360
- $[45] = t17;
361
- $[46] = t18;
336
+ $[41] = styles.container;
337
+ $[42] = t15;
338
+ $[43] = t16;
362
339
  } else {
363
- t18 = $[46];
340
+ t16 = $[43];
364
341
  }
365
- return t18;
342
+ return t16;
366
343
  }
367
- let t15;
368
- if ($[47] !== canDeleteNonAuthoredMessages || $[48] !== conversation || $[49] !== conversation_id || $[50] !== fetchNextPage || $[51] !== hasNextPage || $[52] !== messagesWithSeparators || $[53] !== noMessages || $[54] !== onContentSizeChange || $[55] !== onLayout || $[56] !== onMomentumScrollEnd || $[57] !== onScrollEndDrag || $[58] !== reply_root_id || $[59] !== styles.emptyState || $[60] !== styles.listContainer || $[61] !== styles.listHeader) {
369
- t15 = noMessages ? /*#__PURE__*/_jsx(View, {
344
+ let t13;
345
+ if ($[44] !== conversation || $[45] !== conversation_id || $[46] !== fetchNextPage || $[47] !== hasNextPage || $[48] !== messages || $[49] !== noMessages || $[50] !== onContentSizeChange || $[51] !== onLayout || $[52] !== onMomentumScrollEnd || $[53] !== onScrollEndDrag || $[54] !== reply_root_id || $[55] !== styles.emptyState) {
346
+ t13 = noMessages ? /*#__PURE__*/_jsx(View, {
370
347
  style: styles.emptyState,
371
348
  children: /*#__PURE__*/_jsx(ConversationStartBanner, {
372
349
  conversation: conversation,
373
350
  hasMessages: false
374
351
  })
375
- }) : /*#__PURE__*/_jsx(FlatList, {
376
- inverted: true,
377
- ref: listRef,
378
- contentContainerStyle: styles.listContainer,
379
- data: messagesWithSeparators,
380
- keyExtractor: _temp,
352
+ }) : /*#__PURE__*/_jsx(MessageList, {
353
+ listRef: listRef,
354
+ conversation: conversation,
355
+ conversationId: conversation_id,
356
+ messages: messages,
357
+ replyRootId: reply_root_id,
358
+ hasNextPage: hasNextPage,
359
+ onEndReached: () => fetchNextPage(),
381
360
  onScroll: trackScroll,
382
361
  onLayout: onLayout,
383
362
  onContentSizeChange: onContentSizeChange,
384
363
  onScrollEndDrag: onScrollEndDrag,
385
- onMomentumScrollEnd: onMomentumScrollEnd,
386
- scrollEventThrottle: 10,
387
- ListFooterComponent: hasNextPage ? null : /*#__PURE__*/_jsx(ConversationStartBanner, {
388
- conversation: conversation,
389
- hasMessages: true
390
- }),
391
- renderItem: t16 => {
392
- const {
393
- item: item_0
394
- } = t16;
395
- if (item_0.type === "DateSeparator") {
396
- return /*#__PURE__*/_jsx(InlineDateSeparator, {
397
- ...item_0
398
- });
399
- }
400
- if (item_0.type === "ReplyShadowMessage") {
401
- return /*#__PURE__*/_jsx(ReplyShadowMessage, {
402
- ...item_0,
403
- conversation_id: conversation_id,
404
- inReplyScreen: !!reply_root_id
405
- });
406
- }
407
- if (isSystemMessage(item_0)) {
408
- return /*#__PURE__*/_jsx(SystemMessage, {
409
- message: item_0,
410
- conversationId: conversation_id
411
- });
412
- }
413
- return /*#__PURE__*/_jsx(Message, {
414
- ...item_0,
415
- canDeleteNonAuthoredMessages: canDeleteNonAuthoredMessages,
416
- conversation_id: conversation_id,
417
- latestReadMessageSortKey: conversation?.latestReadMessageSortKey,
418
- inReplyScreen: !!reply_root_id
419
- });
420
- },
421
- onEndReached: () => fetchNextPage(),
422
- ListHeaderComponent: /*#__PURE__*/_jsx(View, {
423
- style: styles.listHeader
424
- })
364
+ onMomentumScrollEnd: onMomentumScrollEnd
425
365
  });
426
- $[47] = canDeleteNonAuthoredMessages;
427
- $[48] = conversation;
428
- $[49] = conversation_id;
429
- $[50] = fetchNextPage;
430
- $[51] = hasNextPage;
431
- $[52] = messagesWithSeparators;
432
- $[53] = noMessages;
433
- $[54] = onContentSizeChange;
434
- $[55] = onLayout;
435
- $[56] = onMomentumScrollEnd;
436
- $[57] = onScrollEndDrag;
437
- $[58] = reply_root_id;
438
- $[59] = styles.emptyState;
439
- $[60] = styles.listContainer;
440
- $[61] = styles.listHeader;
441
- $[62] = t15;
442
- } else {
443
- t15 = $[62];
366
+ $[44] = conversation;
367
+ $[45] = conversation_id;
368
+ $[46] = fetchNextPage;
369
+ $[47] = hasNextPage;
370
+ $[48] = messages;
371
+ $[49] = noMessages;
372
+ $[50] = onContentSizeChange;
373
+ $[51] = onLayout;
374
+ $[52] = onMomentumScrollEnd;
375
+ $[53] = onScrollEndDrag;
376
+ $[54] = reply_root_id;
377
+ $[55] = styles.emptyState;
378
+ $[56] = t13;
379
+ } else {
380
+ t13 = $[56];
444
381
  }
445
- let t16;
446
- if ($[63] !== handleReturnToBottom || $[64] !== showJumpToBottomButton) {
447
- t16 = /*#__PURE__*/_jsx(JumpToBottomButton, {
382
+ let t14;
383
+ if ($[57] !== handleReturnToBottom || $[58] !== showJumpToBottomButton) {
384
+ t14 = /*#__PURE__*/_jsx(JumpToBottomButton, {
448
385
  onPress: handleReturnToBottom,
449
386
  visible: showJumpToBottomButton
450
387
  });
451
- $[63] = handleReturnToBottom;
452
- $[64] = showJumpToBottomButton;
453
- $[65] = t16;
388
+ $[57] = handleReturnToBottom;
389
+ $[58] = showJumpToBottomButton;
390
+ $[59] = t14;
454
391
  } else {
455
- t16 = $[65];
392
+ t14 = $[59];
456
393
  }
457
- let t17;
458
- if ($[66] !== noMessages) {
459
- t17 = !noMessages && /*#__PURE__*/_jsx(TypingIndicator, {});
460
- $[66] = noMessages;
461
- $[67] = t17;
394
+ let t15;
395
+ if ($[60] !== noMessages) {
396
+ t15 = !noMessages && /*#__PURE__*/_jsx(TypingIndicator, {});
397
+ $[60] = noMessages;
398
+ $[61] = t15;
462
399
  } else {
463
- t17 = $[67];
400
+ t15 = $[61];
464
401
  }
465
- let t18;
466
- if ($[68] !== showLeaderDisabledReplyBanner) {
467
- t18 = showLeaderDisabledReplyBanner && /*#__PURE__*/_jsx(LeaderMessagesDisabledBanner, {});
468
- $[68] = showLeaderDisabledReplyBanner;
469
- $[69] = t18;
402
+ let t16;
403
+ if ($[62] !== showLeaderDisabledReplyBanner) {
404
+ t16 = showLeaderDisabledReplyBanner && /*#__PURE__*/_jsx(LeaderMessagesDisabledBanner, {});
405
+ $[62] = showLeaderDisabledReplyBanner;
406
+ $[63] = t16;
470
407
  } else {
471
- t18 = $[69];
408
+ t16 = $[63];
472
409
  }
473
- let t19;
474
- if ($[70] !== canReply || $[71] !== conversation || $[72] !== currentlyEditingMessage || $[73] !== markHandledByMessageForm || $[74] !== replyRootAuthorFirstName || $[75] !== reply_root_id) {
475
- t19 = /*#__PURE__*/_jsx(ConversationBottomBar, {
410
+ let t17;
411
+ if ($[64] !== canReply || $[65] !== conversation || $[66] !== currentlyEditingMessage || $[67] !== markHandledByMessageForm || $[68] !== replyRootAuthorFirstName || $[69] !== reply_root_id) {
412
+ t17 = /*#__PURE__*/_jsx(ConversationBottomBar, {
476
413
  conversation: conversation,
477
414
  canReply: canReply,
478
415
  replyRootAuthorFirstName: replyRootAuthorFirstName,
@@ -480,46 +417,43 @@ function ConversationScreenContent(t0) {
480
417
  currentlyEditingMessage: currentlyEditingMessage,
481
418
  onFlaggedInMessageForm: markHandledByMessageForm
482
419
  });
483
- $[70] = canReply;
484
- $[71] = conversation;
485
- $[72] = currentlyEditingMessage;
486
- $[73] = markHandledByMessageForm;
487
- $[74] = replyRootAuthorFirstName;
488
- $[75] = reply_root_id;
489
- $[76] = t19;
490
- } else {
491
- t19 = $[76];
492
- }
493
- let t20;
494
- if ($[77] !== t15 || $[78] !== t16 || $[79] !== t17 || $[80] !== t18 || $[81] !== t19) {
495
- t20 = /*#__PURE__*/_jsxs(KeyboardView, {
496
- children: [t15, t16, t17, t18, t19]
420
+ $[64] = canReply;
421
+ $[65] = conversation;
422
+ $[66] = currentlyEditingMessage;
423
+ $[67] = markHandledByMessageForm;
424
+ $[68] = replyRootAuthorFirstName;
425
+ $[69] = reply_root_id;
426
+ $[70] = t17;
427
+ } else {
428
+ t17 = $[70];
429
+ }
430
+ let t18;
431
+ if ($[71] !== t13 || $[72] !== t14 || $[73] !== t15 || $[74] !== t16 || $[75] !== t17) {
432
+ t18 = /*#__PURE__*/_jsxs(KeyboardView, {
433
+ children: [t13, t14, t15, t16, t17]
497
434
  });
498
- $[77] = t15;
499
- $[78] = t16;
500
- $[79] = t17;
501
- $[80] = t18;
502
- $[81] = t19;
503
- $[82] = t20;
504
- } else {
505
- t20 = $[82];
506
- }
507
- let t21;
508
- if ($[83] !== styles.container || $[84] !== t20) {
509
- t21 = /*#__PURE__*/_jsx(View, {
435
+ $[71] = t13;
436
+ $[72] = t14;
437
+ $[73] = t15;
438
+ $[74] = t16;
439
+ $[75] = t17;
440
+ $[76] = t18;
441
+ } else {
442
+ t18 = $[76];
443
+ }
444
+ let t19;
445
+ if ($[77] !== styles.container || $[78] !== t18) {
446
+ t19 = /*#__PURE__*/_jsx(View, {
510
447
  style: styles.container,
511
- children: t20
448
+ children: t18
512
449
  });
513
- $[83] = styles.container;
514
- $[84] = t20;
515
- $[85] = t21;
450
+ $[77] = styles.container;
451
+ $[78] = t18;
452
+ $[79] = t19;
516
453
  } else {
517
- t21 = $[85];
454
+ t19 = $[79];
518
455
  }
519
- return t21;
520
- }
521
- function _temp(item) {
522
- return item.id;
456
+ return t19;
523
457
  }
524
458
  function ConversationBottomBar(t0) {
525
459
  const $ = _c(15);
@@ -600,115 +534,6 @@ function ConversationBottomBar(t0) {
600
534
  }
601
535
  return t6;
602
536
  }
603
- function InlineDateSeparator(t0) {
604
- const $ = _c(17);
605
- const {
606
- date
607
- } = t0;
608
- const styles = useDateSeparatorStyles();
609
- let t1;
610
- if ($[0] !== date) {
611
- t1 = getRelativeDateStatus(date);
612
- $[0] = date;
613
- $[1] = t1;
614
- } else {
615
- t1 = $[1];
616
- }
617
- const {
618
- isThisYear
619
- } = t1;
620
- const showYear = !isThisYear;
621
- let t2;
622
- if ($[2] !== date || $[3] !== showYear) {
623
- t2 = formatDate(date, {
624
- style: "long",
625
- year: showYear
626
- });
627
- $[2] = date;
628
- $[3] = showYear;
629
- $[4] = t2;
630
- } else {
631
- t2 = $[4];
632
- }
633
- const dateStamp = t2;
634
- let t3;
635
- if ($[5] !== styles.separator) {
636
- t3 = /*#__PURE__*/_jsx(View, {
637
- style: styles.separator
638
- });
639
- $[5] = styles.separator;
640
- $[6] = t3;
641
- } else {
642
- t3 = $[6];
643
- }
644
- let t4;
645
- if ($[7] !== dateStamp || $[8] !== styles.dateText) {
646
- t4 = /*#__PURE__*/_jsx(Text, {
647
- variant: "footnote",
648
- style: styles.dateText,
649
- children: dateStamp
650
- });
651
- $[7] = dateStamp;
652
- $[8] = styles.dateText;
653
- $[9] = t4;
654
- } else {
655
- t4 = $[9];
656
- }
657
- let t5;
658
- if ($[10] !== styles.separator) {
659
- t5 = /*#__PURE__*/_jsx(View, {
660
- style: styles.separator
661
- });
662
- $[10] = styles.separator;
663
- $[11] = t5;
664
- } else {
665
- t5 = $[11];
666
- }
667
- let t6;
668
- if ($[12] !== styles.container || $[13] !== t3 || $[14] !== t4 || $[15] !== t5) {
669
- t6 = /*#__PURE__*/_jsxs(View, {
670
- style: styles.container,
671
- children: [t3, t4, t5]
672
- });
673
- $[12] = styles.container;
674
- $[13] = t3;
675
- $[14] = t4;
676
- $[15] = t5;
677
- $[16] = t6;
678
- } else {
679
- t6 = $[16];
680
- }
681
- return t6;
682
- }
683
- const useDateSeparatorStyles = () => {
684
- const $ = _c(2);
685
- const theme = useTheme();
686
- let t0;
687
- if ($[0] !== theme.colors.borderColorDefaultBase) {
688
- t0 = StyleSheet.create({
689
- container: {
690
- alignItems: "center",
691
- flexDirection: "row",
692
- paddingHorizontal: CONVERSATION_MESSAGE_LIST_PADDING_HORIZONTAL,
693
- paddingVertical: 16
694
- },
695
- separator: {
696
- flex: 1,
697
- height: 1,
698
- borderTopWidth: 1,
699
- borderTopColor: theme.colors.borderColorDefaultBase
700
- },
701
- dateText: {
702
- paddingHorizontal: 8
703
- }
704
- });
705
- $[0] = theme.colors.borderColorDefaultBase;
706
- $[1] = t0;
707
- } else {
708
- t0 = $[1];
709
- }
710
- return t0;
711
- };
712
537
  export const ConversationScreenTitle = t0 => {
713
538
  const $ = _c(29);
714
539
  const {
@@ -903,12 +728,6 @@ const useStyles = () => {
903
728
  emptyState: {
904
729
  flex: 1,
905
730
  justifyContent: "center"
906
- },
907
- listContainer: {
908
- paddingVertical: 12
909
- },
910
- listHeader: {
911
- height: 16
912
731
  }
913
732
  });
914
733
  $[0] = bottom;
@@ -934,7 +753,7 @@ const useEnsureConversationsRouteExists = () => {
934
753
  t0 = () => {
935
754
  const navigationState = navigation.getState();
936
755
  const routes = navigationState?.routes || [];
937
- const conversationsRoute = routes.find(_temp2);
756
+ const conversationsRoute = routes.find(_temp);
938
757
  if (conversationsRoute) {
939
758
  return;
940
759
  }
@@ -967,7 +786,7 @@ const useEnsureConversationsRouteExists = () => {
967
786
  }
968
787
  useEffect(t0, t2);
969
788
  };
970
- function _temp2(r) {
789
+ function _temp(r) {
971
790
  return r.name === "Conversations";
972
791
  }
973
792
  //# sourceMappingURL=conversation_screen.js.map