@planningcenter/chat-react-native 4.2.1-qa-staging.9 → 4.2.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 (106) hide show
  1. package/build/components/conversation/message_form.d.ts +1 -2
  2. package/build/components/conversation/message_form.d.ts.map +1 -1
  3. package/build/components/conversation/message_form.js +370 -167
  4. package/build/components/conversation/message_form.js.map +1 -1
  5. package/build/components/conversation/message_list.d.ts +2 -5
  6. package/build/components/conversation/message_list.d.ts.map +1 -1
  7. package/build/components/conversation/message_list.js +67 -187
  8. package/build/components/conversation/message_list.js.map +1 -1
  9. package/build/hooks/groups/use_group_members_for_new_conversation.d.ts +3 -4
  10. package/build/hooks/groups/use_group_members_for_new_conversation.d.ts.map +1 -1
  11. package/build/hooks/index.d.ts +0 -1
  12. package/build/hooks/index.d.ts.map +1 -1
  13. package/build/hooks/index.js +0 -1
  14. package/build/hooks/index.js.map +1 -1
  15. package/build/hooks/use_conversation_messages.d.ts +5 -14
  16. package/build/hooks/use_conversation_messages.d.ts.map +1 -1
  17. package/build/hooks/use_conversation_messages.js +42 -218
  18. package/build/hooks/use_conversation_messages.js.map +1 -1
  19. package/build/hooks/use_conversation_messages_jolt_events.d.ts.map +1 -1
  20. package/build/hooks/use_conversation_messages_jolt_events.js +42 -58
  21. package/build/hooks/use_conversation_messages_jolt_events.js.map +1 -1
  22. package/build/hooks/use_features.d.ts +1 -2
  23. package/build/hooks/use_features.d.ts.map +1 -1
  24. package/build/hooks/use_features.js +1 -2
  25. package/build/hooks/use_features.js.map +1 -1
  26. package/build/hooks/use_mark_latest_message_read.d.ts +1 -2
  27. package/build/hooks/use_mark_latest_message_read.d.ts.map +1 -1
  28. package/build/hooks/use_mark_latest_message_read.js +3 -4
  29. package/build/hooks/use_mark_latest_message_read.js.map +1 -1
  30. package/build/hooks/use_read_receipts.d.ts +3 -4
  31. package/build/hooks/use_read_receipts.d.ts.map +1 -1
  32. package/build/hooks/use_suspense_api.d.ts +6 -10
  33. package/build/hooks/use_suspense_api.d.ts.map +1 -1
  34. package/build/hooks/use_suspense_api.js +63 -83
  35. package/build/hooks/use_suspense_api.js.map +1 -1
  36. package/build/screens/conversation_new/components/services_form.js +8 -9
  37. package/build/screens/conversation_new/components/services_form.js.map +1 -1
  38. package/build/screens/conversation_screen.d.ts +0 -1
  39. package/build/screens/conversation_screen.d.ts.map +1 -1
  40. package/build/screens/conversation_screen.js +203 -305
  41. package/build/screens/conversation_screen.js.map +1 -1
  42. package/build/screens/message_actions_screen.d.ts.map +1 -1
  43. package/build/screens/message_actions_screen.js +92 -103
  44. package/build/screens/message_actions_screen.js.map +1 -1
  45. package/build/screens/notification_settings/hooks/groups.d.ts +3 -4
  46. package/build/screens/notification_settings/hooks/groups.d.ts.map +1 -1
  47. package/build/types/api_primitives.d.ts +0 -1
  48. package/build/types/api_primitives.d.ts.map +1 -1
  49. package/build/types/api_primitives.js.map +1 -1
  50. package/build/types/resources/member.d.ts +0 -1
  51. package/build/types/resources/member.d.ts.map +1 -1
  52. package/build/types/resources/member.js.map +1 -1
  53. package/build/utils/cache/messages_cache.d.ts +0 -1
  54. package/build/utils/cache/messages_cache.d.ts.map +1 -1
  55. package/build/utils/cache/messages_cache.js +1 -37
  56. package/build/utils/cache/messages_cache.js.map +1 -1
  57. package/build/utils/client/types.d.ts +0 -1
  58. package/build/utils/client/types.d.ts.map +1 -1
  59. package/build/utils/client/types.js.map +1 -1
  60. package/build/utils/group_messages.js +1 -4
  61. package/build/utils/group_messages.js.map +1 -1
  62. package/package.json +3 -3
  63. package/src/__tests__/hooks/use_features.test.ts +2 -10
  64. package/src/__utils__/query_client.ts +0 -3
  65. package/src/components/conversation/message_form.tsx +3 -31
  66. package/src/components/conversation/message_list.tsx +4 -88
  67. package/src/hooks/__tests__/use_message_create_or_update.test.tsx +7 -2
  68. package/src/hooks/index.ts +0 -1
  69. package/src/hooks/use_conversation_messages.ts +17 -103
  70. package/src/hooks/use_conversation_messages_jolt_events.ts +2 -12
  71. package/src/hooks/use_features.ts +2 -3
  72. package/src/hooks/use_mark_latest_message_read.ts +3 -4
  73. package/src/hooks/use_suspense_api.ts +6 -14
  74. package/src/screens/conversation_new/components/services_form.tsx +5 -5
  75. package/src/screens/conversation_screen.tsx +13 -62
  76. package/src/screens/message_actions_screen.tsx +1 -12
  77. package/src/types/api_primitives.ts +0 -1
  78. package/src/types/resources/member.ts +0 -1
  79. package/src/utils/__tests__/group_messages.test.ts +0 -29
  80. package/src/utils/cache/__tests__/messages_cache.test.ts +1 -2
  81. package/src/utils/cache/__tests__/messages_cache_reply_roots.test.ts +2 -3
  82. package/src/utils/cache/messages_cache.ts +1 -45
  83. package/src/utils/client/types.ts +0 -1
  84. package/src/utils/group_messages.ts +1 -4
  85. package/build/components/conversation/missing_message.d.ts +0 -2
  86. package/build/components/conversation/missing_message.d.ts.map +0 -1
  87. package/build/components/conversation/missing_message.js +0 -139
  88. package/build/components/conversation/missing_message.js.map +0 -1
  89. package/build/hooks/use_direct_message_eligibility.d.ts +0 -14
  90. package/build/hooks/use_direct_message_eligibility.d.ts.map +0 -1
  91. package/build/hooks/use_direct_message_eligibility.js +0 -87
  92. package/build/hooks/use_direct_message_eligibility.js.map +0 -1
  93. package/build/utils/cache/messages_window.d.ts +0 -11
  94. package/build/utils/cache/messages_window.d.ts.map +0 -1
  95. package/build/utils/cache/messages_window.js +0 -51
  96. package/build/utils/cache/messages_window.js.map +0 -1
  97. package/src/__tests__/hooks/use_direct_message_eligibility.test.tsx +0 -83
  98. package/src/__tests__/screens/conversation_new/components/services_form.test.tsx +0 -91
  99. package/src/components/conversation/missing_message.tsx +0 -66
  100. package/src/hooks/__tests__/use_conversation_messages.test.tsx +0 -333
  101. package/src/hooks/__tests__/use_conversation_messages_jolt_events.test.tsx +0 -87
  102. package/src/hooks/__tests__/use_mark_latest_message_read.test.tsx +0 -33
  103. package/src/hooks/use_direct_message_eligibility.ts +0 -40
  104. package/src/utils/cache/__tests__/messages_cache_deletion.test.ts +0 -97
  105. package/src/utils/cache/__tests__/messages_window.test.ts +0 -78
  106. package/src/utils/cache/messages_window.ts +0 -55
@@ -18,13 +18,12 @@ import { ConversationContextProvider } from '../contexts/conversation_context';
18
18
  import { useMessageAvailableMembersAction } from '../hooks/direct_messages/use_message_available_members_action';
19
19
  import { useConversation } from '../hooks/use_conversation';
20
20
  import { useConversationJoltEvents } from '../hooks/use_conversation_jolt_events';
21
- import { dropMessagesWindowIfBehind, useConversationMessages } from '../hooks/use_conversation_messages';
21
+ import { useConversationMessages } from '../hooks/use_conversation_messages';
22
22
  import { useConversationMessagesJoltEvents } from '../hooks/use_conversation_messages_jolt_events';
23
23
  import { useMarkLatestMessageRead } from '../hooks/use_mark_latest_message_read';
24
24
  import { analyticsEvents, normalizeAnalyticsMetadata, usePublishProductAnalyticsEvent } from '../hooks/use_product_analytics';
25
25
  import { useRestAwayFromDismissEdge } from '../hooks/use_rest_away_from_dismiss_edge';
26
26
  import { useVideoModerationJoltEvents } from '../hooks/use_video_moderation_jolt_events';
27
- import { Log } from '../utils';
28
27
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
29
28
  export function ConversationScreen(t0) {
30
29
  const $ = _c(13);
@@ -97,7 +96,7 @@ export function ConversationScreen(t0) {
97
96
  return t6;
98
97
  }
99
98
  function ConversationScreenContent(t0) {
100
- const $ = _c(103);
99
+ const $ = _c(80);
101
100
  const {
102
101
  route
103
102
  } = t0;
@@ -107,76 +106,67 @@ function ConversationScreenContent(t0) {
107
106
  conversation_id,
108
107
  editing_message_id,
109
108
  reply_root_id,
110
- reply_root_author_name,
111
- initial_message_id
109
+ reply_root_author_name
112
110
  } = route.params;
113
111
  const {
114
112
  data: conversation
115
113
  } = useConversation(route.params);
116
114
  let t1;
117
- if ($[0] !== conversation_id || $[1] !== initial_message_id || $[2] !== reply_root_id) {
115
+ if ($[0] !== conversation_id || $[1] !== reply_root_id) {
118
116
  t1 = {
119
117
  conversation_id,
120
- reply_root_id,
121
- anchor: initial_message_id
118
+ reply_root_id
122
119
  };
123
120
  $[0] = conversation_id;
124
- $[1] = initial_message_id;
125
- $[2] = reply_root_id;
126
- $[3] = t1;
121
+ $[1] = reply_root_id;
122
+ $[2] = t1;
127
123
  } else {
128
- t1 = $[3];
124
+ t1 = $[2];
129
125
  }
130
126
  const {
131
127
  messages,
132
- behind,
133
128
  fetchNextPage,
134
- fetchNewer,
135
- fetchLiveWindow,
136
129
  hasNextPage
137
130
  } = useConversationMessages(t1);
138
131
  let t2;
139
- if ($[4] !== conversation_id) {
132
+ if ($[3] !== conversation_id) {
140
133
  t2 = {
141
134
  conversationId: conversation_id
142
135
  };
143
- $[4] = conversation_id;
144
- $[5] = t2;
136
+ $[3] = conversation_id;
137
+ $[4] = t2;
145
138
  } else {
146
- t2 = $[5];
139
+ t2 = $[4];
147
140
  }
148
141
  useConversationJoltEvents(t2);
149
142
  let t3;
150
- if ($[6] !== conversation_id) {
143
+ if ($[5] !== conversation_id) {
151
144
  t3 = {
152
145
  conversationId: conversation_id
153
146
  };
154
- $[6] = conversation_id;
155
- $[7] = t3;
147
+ $[5] = conversation_id;
148
+ $[6] = t3;
156
149
  } else {
157
- t3 = $[7];
150
+ t3 = $[6];
158
151
  }
159
152
  useConversationMessagesJoltEvents(t3);
160
153
  const {
161
154
  markHandledByMessageForm
162
155
  } = useVideoModerationJoltEvents();
163
156
  useEnsureConversationsRouteExists();
164
- const t4 = !behind;
165
- let t5;
166
- if ($[8] !== conversation || $[9] !== messages || $[10] !== t4) {
167
- t5 = {
157
+ let t4;
158
+ if ($[7] !== conversation || $[8] !== messages) {
159
+ t4 = {
168
160
  conversation,
169
- messages,
170
- enabled: t4
161
+ messages
171
162
  };
172
- $[8] = conversation;
173
- $[9] = messages;
174
- $[10] = t4;
175
- $[11] = t5;
163
+ $[7] = conversation;
164
+ $[8] = messages;
165
+ $[9] = t4;
176
166
  } else {
177
- t5 = $[11];
167
+ t4 = $[9];
178
168
  }
179
- useMarkLatestMessageRead(t5);
169
+ useMarkLatestMessageRead(t4);
180
170
  const noMessages = messages.length === 0;
181
171
  const {
182
172
  repliesDisabled,
@@ -186,57 +176,57 @@ function ConversationScreenContent(t0) {
186
176
  } = conversation;
187
177
  const canReply = memberAbility?.canReply;
188
178
  const showLeaderDisabledReplyBanner = canReply && repliesDisabled;
189
- let t6;
190
- if ($[12] !== editing_message_id || $[13] !== messages) {
191
- let t7;
192
- if ($[15] !== editing_message_id) {
193
- t7 = m => String(m.id) === String(editing_message_id);
194
- $[15] = editing_message_id;
195
- $[16] = t7;
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;
196
186
  } else {
197
- t7 = $[16];
187
+ t6 = $[14];
198
188
  }
199
- t6 = messages.find(t7);
200
- $[12] = editing_message_id;
201
- $[13] = messages;
202
- $[14] = t6;
189
+ t5 = messages.find(t6);
190
+ $[10] = editing_message_id;
191
+ $[11] = messages;
192
+ $[12] = t5;
203
193
  } else {
204
- t6 = $[14];
194
+ t5 = $[12];
205
195
  }
206
- const currentlyEditingMessage = t6;
207
- let t7;
208
- if ($[17] !== reply_root_author_name) {
209
- t7 = reply_root_author_name?.split(" ")[0];
210
- $[17] = reply_root_author_name;
211
- $[18] = t7;
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;
212
202
  } else {
213
- t7 = $[18];
203
+ t6 = $[16];
214
204
  }
215
- const replyRootAuthorFirstName = t7;
205
+ const replyRootAuthorFirstName = t6;
216
206
  const replyHeaderTitle = replyRootAuthorFirstName ? `Reply to ${replyRootAuthorFirstName}` : "Reply";
217
207
  const muted = conversation.conversationMembership?.muted ?? conversation.muted;
218
208
  const listRef = useRef(null);
219
209
  const [showJumpToBottomButton, setShowJumpToBottomButton] = useState(false);
220
- let t8;
221
- if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
222
- t8 = event => {
210
+ let t7;
211
+ if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
212
+ t7 = event => {
223
213
  const offsetY = event.nativeEvent.contentOffset.y;
224
214
  setShowJumpToBottomButton(offsetY > 200);
225
215
  };
226
- $[19] = t8;
216
+ $[17] = t7;
227
217
  } else {
228
- t8 = $[19];
218
+ t7 = $[17];
229
219
  }
230
- const trackScroll = t8;
231
- let t9;
232
- if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
233
- t9 = {
220
+ const trackScroll = t7;
221
+ let t8;
222
+ if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
223
+ t8 = {
234
224
  listRef,
235
225
  enabled: Platform.OS === "ios"
236
226
  };
237
- $[20] = t9;
227
+ $[18] = t8;
238
228
  } else {
239
- t9 = $[20];
229
+ t8 = $[18];
240
230
  }
241
231
  const {
242
232
  restOffset,
@@ -244,52 +234,23 @@ function ConversationScreenContent(t0) {
244
234
  onContentSizeChange,
245
235
  onMomentumScrollEnd,
246
236
  onScrollEndDrag
247
- } = useRestAwayFromDismissEdge(t9);
248
- const [anchorMessageId, setAnchorMessageId] = useState(initial_message_id);
249
- let t10;
250
- if ($[21] === Symbol.for("react.memo_cache_sentinel")) {
251
- t10 = () => setAnchorMessageId(null);
252
- $[21] = t10;
253
- } else {
254
- t10 = $[21];
255
- }
256
- const releaseAnchor = t10;
257
- let t11;
258
- if ($[22] !== restOffset) {
259
- t11 = t12 => {
260
- const animated = t12 === undefined ? true : t12;
261
- releaseAnchor();
237
+ } = useRestAwayFromDismissEdge(t8);
238
+ let t9;
239
+ if ($[19] !== restOffset) {
240
+ t9 = () => {
262
241
  listRef.current?.scrollToOffset({
263
- offset: restOffset,
264
- animated
242
+ offset: restOffset
265
243
  });
266
244
  };
267
- $[22] = restOffset;
268
- $[23] = t11;
269
- } else {
270
- t11 = $[23];
271
- }
272
- const handleReturnToBottom = t11;
273
- const logWindowFetchFailure = _temp;
274
- let t12;
275
- if ($[24] !== behind || $[25] !== fetchLiveWindow || $[26] !== handleReturnToBottom) {
276
- t12 = async () => {
277
- if (behind) {
278
- await fetchLiveWindow();
279
- }
280
- handleReturnToBottom(false);
281
- };
282
- $[24] = behind;
283
- $[25] = fetchLiveWindow;
284
- $[26] = handleReturnToBottom;
285
- $[27] = t12;
245
+ $[19] = restOffset;
246
+ $[20] = t9;
286
247
  } else {
287
- t12 = $[27];
248
+ t9 = $[20];
288
249
  }
289
- const returnToLatest = t12;
290
- let t13;
291
- if ($[28] !== badges?.[0] || $[29] !== conversation.deleted || $[30] !== muted || $[31] !== navigation || $[32] !== replyHeaderTitle || $[33] !== reply_root_id || $[34] !== title) {
292
- t13 = () => {
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 = () => {
293
254
  if (reply_root_id) {
294
255
  navigation.setParams({
295
256
  title: replyHeaderTitle
@@ -303,124 +264,86 @@ function ConversationScreenContent(t0) {
303
264
  });
304
265
  }
305
266
  };
306
- $[28] = badges?.[0];
307
- $[29] = conversation.deleted;
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;
308
283
  $[30] = muted;
309
284
  $[31] = navigation;
310
285
  $[32] = replyHeaderTitle;
311
286
  $[33] = reply_root_id;
312
- $[34] = title;
313
- $[35] = t13;
314
- } else {
315
- t13 = $[35];
316
- }
317
- const t14 = conversation?.deleted;
318
- let t15;
319
- if ($[36] !== badges || $[37] !== muted || $[38] !== navigation || $[39] !== replyHeaderTitle || $[40] !== reply_root_id || $[41] !== t14 || $[42] !== title) {
320
- t15 = [navigation, title, badges, t14, reply_root_id, replyHeaderTitle, muted];
321
- $[36] = badges;
322
- $[37] = muted;
323
- $[38] = navigation;
324
- $[39] = replyHeaderTitle;
325
- $[40] = reply_root_id;
326
- $[41] = t14;
327
- $[42] = title;
328
- $[43] = t15;
329
- } else {
330
- t15 = $[43];
331
- }
332
- useEffect(t13, t15);
333
- let t16;
334
- let t17;
335
- if ($[44] !== initial_message_id || $[45] !== navigation) {
336
- t16 = () => {
337
- if (!initial_message_id) {
338
- return;
339
- }
340
- navigation.setParams({
341
- initial_message_id: null
342
- });
343
- };
344
- t17 = [initial_message_id, navigation];
345
- $[44] = initial_message_id;
346
- $[45] = navigation;
347
- $[46] = t16;
348
- $[47] = t17;
349
- } else {
350
- t16 = $[46];
351
- t17 = $[47];
352
- }
353
- useEffect(t16, t17);
354
- let t18;
355
- let t19;
356
- if ($[48] !== conversation_id || $[49] !== reply_root_id) {
357
- t18 = () => () => dropMessagesWindowIfBehind({
358
- conversation_id,
359
- reply_root_id
360
- });
361
- t19 = [conversation_id, reply_root_id];
362
- $[48] = conversation_id;
363
- $[49] = reply_root_id;
364
- $[50] = t18;
365
- $[51] = t19;
287
+ $[34] = t11;
288
+ $[35] = title;
289
+ $[36] = t12;
366
290
  } else {
367
- t18 = $[50];
368
- t19 = $[51];
291
+ t12 = $[36];
369
292
  }
370
- useEffect(t18, t19);
293
+ useEffect(t10, t12);
371
294
  if (!conversation || conversation.deleted) {
372
- let t20;
373
- if ($[52] === Symbol.for("react.memo_cache_sentinel")) {
374
- t20 = /*#__PURE__*/_jsx(BlankState.Imagery, {
295
+ let t13;
296
+ if ($[37] === Symbol.for("react.memo_cache_sentinel")) {
297
+ t13 = /*#__PURE__*/_jsx(BlankState.Imagery, {
375
298
  name: "general.outlinedTextMessage"
376
299
  });
377
- $[52] = t20;
300
+ $[37] = t13;
378
301
  } else {
379
- t20 = $[52];
302
+ t13 = $[37];
380
303
  }
381
- let t21;
382
- if ($[53] === Symbol.for("react.memo_cache_sentinel")) {
383
- t21 = /*#__PURE__*/_jsx(BlankState.Content, {
304
+ let t14;
305
+ if ($[38] === Symbol.for("react.memo_cache_sentinel")) {
306
+ t14 = /*#__PURE__*/_jsx(BlankState.Content, {
384
307
  children: /*#__PURE__*/_jsx(BlankState.Heading, {
385
308
  children: "This conversation has been deleted"
386
309
  })
387
310
  });
388
- $[53] = t21;
311
+ $[38] = t14;
389
312
  } else {
390
- t21 = $[53];
313
+ t14 = $[38];
391
314
  }
392
- let t22;
393
- if ($[54] !== navigation.goBack) {
394
- t22 = /*#__PURE__*/_jsxs(BlankState.Root, {
395
- children: [t20, t21, /*#__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, {
396
319
  onPress: navigation.goBack,
397
320
  title: "Back to conversations",
398
321
  accessibilityHint: "Navigates back to the conversations list",
399
322
  accessibilityRole: "link"
400
323
  })]
401
324
  });
402
- $[54] = navigation.goBack;
403
- $[55] = t22;
325
+ $[39] = navigation.goBack;
326
+ $[40] = t15;
404
327
  } else {
405
- t22 = $[55];
328
+ t15 = $[40];
406
329
  }
407
- let t23;
408
- if ($[56] !== styles.container || $[57] !== t22) {
409
- t23 = /*#__PURE__*/_jsx(View, {
330
+ let t16;
331
+ if ($[41] !== styles.container || $[42] !== t15) {
332
+ t16 = /*#__PURE__*/_jsx(View, {
410
333
  style: styles.container,
411
- children: t22
334
+ children: t15
412
335
  });
413
- $[56] = styles.container;
414
- $[57] = t22;
415
- $[58] = t23;
336
+ $[41] = styles.container;
337
+ $[42] = t15;
338
+ $[43] = t16;
416
339
  } else {
417
- t23 = $[58];
340
+ t16 = $[43];
418
341
  }
419
- return t23;
342
+ return t16;
420
343
  }
421
- let t20;
422
- if ($[59] !== anchorMessageId || $[60] !== behind || $[61] !== conversation || $[62] !== conversation_id || $[63] !== fetchNewer || $[64] !== fetchNextPage || $[65] !== hasNextPage || $[66] !== messages || $[67] !== noMessages || $[68] !== onContentSizeChange || $[69] !== onLayout || $[70] !== onMomentumScrollEnd || $[71] !== onScrollEndDrag || $[72] !== reply_root_id || $[73] !== styles.emptyState) {
423
- t20 = 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, {
424
347
  style: styles.emptyState,
425
348
  children: /*#__PURE__*/_jsx(ConversationStartBanner, {
426
349
  conversation: conversation,
@@ -432,138 +355,115 @@ function ConversationScreenContent(t0) {
432
355
  conversationId: conversation_id,
433
356
  messages: messages,
434
357
  replyRootId: reply_root_id,
435
- anchorMessageId: anchorMessageId,
436
- behind: behind,
437
358
  hasNextPage: hasNextPage,
438
359
  onEndReached: () => fetchNextPage(),
439
- onStartReached: () => fetchNewer().catch(logWindowFetchFailure),
440
360
  onScroll: trackScroll,
441
361
  onLayout: onLayout,
442
362
  onContentSizeChange: onContentSizeChange,
443
363
  onScrollEndDrag: onScrollEndDrag,
444
364
  onMomentumScrollEnd: onMomentumScrollEnd
445
365
  });
446
- $[59] = anchorMessageId;
447
- $[60] = behind;
448
- $[61] = conversation;
449
- $[62] = conversation_id;
450
- $[63] = fetchNewer;
451
- $[64] = fetchNextPage;
452
- $[65] = hasNextPage;
453
- $[66] = messages;
454
- $[67] = noMessages;
455
- $[68] = onContentSizeChange;
456
- $[69] = onLayout;
457
- $[70] = onMomentumScrollEnd;
458
- $[71] = onScrollEndDrag;
459
- $[72] = reply_root_id;
460
- $[73] = styles.emptyState;
461
- $[74] = t20;
462
- } else {
463
- t20 = $[74];
464
- }
465
- let t21;
466
- if ($[75] !== behind || $[76] !== handleReturnToBottom || $[77] !== returnToLatest) {
467
- t21 = () => behind ? returnToLatest().catch(logWindowFetchFailure) : handleReturnToBottom();
468
- $[75] = behind;
469
- $[76] = handleReturnToBottom;
470
- $[77] = returnToLatest;
471
- $[78] = t21;
472
- } else {
473
- t21 = $[78];
474
- }
475
- const t22 = showJumpToBottomButton || behind;
476
- let t23;
477
- if ($[79] !== t21 || $[80] !== t22) {
478
- t23 = /*#__PURE__*/_jsx(JumpToBottomButton, {
479
- onPress: t21,
480
- visible: t22
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];
381
+ }
382
+ let t14;
383
+ if ($[57] !== handleReturnToBottom || $[58] !== showJumpToBottomButton) {
384
+ t14 = /*#__PURE__*/_jsx(JumpToBottomButton, {
385
+ onPress: handleReturnToBottom,
386
+ visible: showJumpToBottomButton
481
387
  });
482
- $[79] = t21;
483
- $[80] = t22;
484
- $[81] = t23;
388
+ $[57] = handleReturnToBottom;
389
+ $[58] = showJumpToBottomButton;
390
+ $[59] = t14;
485
391
  } else {
486
- t23 = $[81];
392
+ t14 = $[59];
487
393
  }
488
- let t24;
489
- if ($[82] !== noMessages) {
490
- t24 = !noMessages && /*#__PURE__*/_jsx(TypingIndicator, {});
491
- $[82] = noMessages;
492
- $[83] = t24;
394
+ let t15;
395
+ if ($[60] !== noMessages) {
396
+ t15 = !noMessages && /*#__PURE__*/_jsx(TypingIndicator, {});
397
+ $[60] = noMessages;
398
+ $[61] = t15;
493
399
  } else {
494
- t24 = $[83];
400
+ t15 = $[61];
495
401
  }
496
- let t25;
497
- if ($[84] !== showLeaderDisabledReplyBanner) {
498
- t25 = showLeaderDisabledReplyBanner && /*#__PURE__*/_jsx(LeaderMessagesDisabledBanner, {});
499
- $[84] = showLeaderDisabledReplyBanner;
500
- $[85] = t25;
402
+ let t16;
403
+ if ($[62] !== showLeaderDisabledReplyBanner) {
404
+ t16 = showLeaderDisabledReplyBanner && /*#__PURE__*/_jsx(LeaderMessagesDisabledBanner, {});
405
+ $[62] = showLeaderDisabledReplyBanner;
406
+ $[63] = t16;
501
407
  } else {
502
- t25 = $[85];
408
+ t16 = $[63];
503
409
  }
504
- let t26;
505
- if ($[86] !== canReply || $[87] !== conversation || $[88] !== currentlyEditingMessage || $[89] !== markHandledByMessageForm || $[90] !== replyRootAuthorFirstName || $[91] !== reply_root_id || $[92] !== returnToLatest) {
506
- t26 = /*#__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, {
507
413
  conversation: conversation,
508
414
  canReply: canReply,
509
415
  replyRootAuthorFirstName: replyRootAuthorFirstName,
510
416
  replyRootId: reply_root_id,
511
417
  currentlyEditingMessage: currentlyEditingMessage,
512
- onFlaggedInMessageForm: markHandledByMessageForm,
513
- onBeforeSubmit: returnToLatest
418
+ onFlaggedInMessageForm: markHandledByMessageForm
514
419
  });
515
- $[86] = canReply;
516
- $[87] = conversation;
517
- $[88] = currentlyEditingMessage;
518
- $[89] = markHandledByMessageForm;
519
- $[90] = replyRootAuthorFirstName;
520
- $[91] = reply_root_id;
521
- $[92] = returnToLatest;
522
- $[93] = t26;
523
- } else {
524
- t26 = $[93];
525
- }
526
- let t27;
527
- if ($[94] !== t20 || $[95] !== t23 || $[96] !== t24 || $[97] !== t25 || $[98] !== t26) {
528
- t27 = /*#__PURE__*/_jsxs(KeyboardView, {
529
- children: [t20, t23, t24, t25, t26]
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]
530
434
  });
531
- $[94] = t20;
532
- $[95] = t23;
533
- $[96] = t24;
534
- $[97] = t25;
535
- $[98] = t26;
536
- $[99] = t27;
537
- } else {
538
- t27 = $[99];
539
- }
540
- let t28;
541
- if ($[100] !== styles.container || $[101] !== t27) {
542
- t28 = /*#__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, {
543
447
  style: styles.container,
544
- children: t27
448
+ children: t18
545
449
  });
546
- $[100] = styles.container;
547
- $[101] = t27;
548
- $[102] = t28;
450
+ $[77] = styles.container;
451
+ $[78] = t18;
452
+ $[79] = t19;
549
453
  } else {
550
- t28 = $[102];
454
+ t19 = $[79];
551
455
  }
552
- return t28;
553
- }
554
- function _temp(error) {
555
- return Log.error("conversation window fetch failed", error);
456
+ return t19;
556
457
  }
557
458
  function ConversationBottomBar(t0) {
558
- const $ = _c(16);
459
+ const $ = _c(15);
559
460
  const {
560
461
  conversation,
561
462
  canReply,
562
463
  replyRootAuthorFirstName,
563
464
  replyRootId,
564
465
  currentlyEditingMessage,
565
- onFlaggedInMessageForm,
566
- onBeforeSubmit
466
+ onFlaggedInMessageForm
567
467
  } = t0;
568
468
  const messageLink = useMessageAvailableMembersAction(conversation);
569
469
  if (conversation.disabled) {
@@ -613,26 +513,24 @@ function ConversationBottomBar(t0) {
613
513
  t5 = $[7];
614
514
  }
615
515
  let t6;
616
- if ($[8] !== conversation || $[9] !== currentlyEditingMessage || $[10] !== onBeforeSubmit || $[11] !== onFlaggedInMessageForm || $[12] !== replyRootAuthorFirstName || $[13] !== replyRootId || $[14] !== t1) {
516
+ if ($[8] !== conversation || $[9] !== currentlyEditingMessage || $[10] !== onFlaggedInMessageForm || $[11] !== replyRootAuthorFirstName || $[12] !== replyRootId || $[13] !== t1) {
617
517
  t6 = /*#__PURE__*/_jsxs(MessageForm.Root, {
618
518
  replyRootAuthorFirstName: replyRootAuthorFirstName,
619
519
  conversation: conversation,
620
520
  replyRootId: replyRootId,
621
521
  currentlyEditingMessage: currentlyEditingMessage,
622
522
  onFlaggedInMessageForm: onFlaggedInMessageForm,
623
- onBeforeSubmit: onBeforeSubmit,
624
523
  children: [t2, t3, t4, t5]
625
524
  }, t1);
626
525
  $[8] = conversation;
627
526
  $[9] = currentlyEditingMessage;
628
- $[10] = onBeforeSubmit;
629
- $[11] = onFlaggedInMessageForm;
630
- $[12] = replyRootAuthorFirstName;
631
- $[13] = replyRootId;
632
- $[14] = t1;
633
- $[15] = t6;
527
+ $[10] = onFlaggedInMessageForm;
528
+ $[11] = replyRootAuthorFirstName;
529
+ $[12] = replyRootId;
530
+ $[13] = t1;
531
+ $[14] = t6;
634
532
  } else {
635
- t6 = $[15];
533
+ t6 = $[14];
636
534
  }
637
535
  return t6;
638
536
  }
@@ -855,7 +753,7 @@ const useEnsureConversationsRouteExists = () => {
855
753
  t0 = () => {
856
754
  const navigationState = navigation.getState();
857
755
  const routes = navigationState?.routes || [];
858
- const conversationsRoute = routes.find(_temp2);
756
+ const conversationsRoute = routes.find(_temp);
859
757
  if (conversationsRoute) {
860
758
  return;
861
759
  }
@@ -888,7 +786,7 @@ const useEnsureConversationsRouteExists = () => {
888
786
  }
889
787
  useEffect(t0, t2);
890
788
  };
891
- function _temp2(r) {
789
+ function _temp(r) {
892
790
  return r.name === "Conversations";
893
791
  }
894
792
  //# sourceMappingURL=conversation_screen.js.map