@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.
- package/build/components/conversation/message_form.d.ts +1 -2
- package/build/components/conversation/message_form.d.ts.map +1 -1
- package/build/components/conversation/message_form.js +370 -167
- package/build/components/conversation/message_form.js.map +1 -1
- package/build/components/conversation/message_list.d.ts +2 -5
- package/build/components/conversation/message_list.d.ts.map +1 -1
- package/build/components/conversation/message_list.js +67 -187
- package/build/components/conversation/message_list.js.map +1 -1
- package/build/hooks/groups/use_group_members_for_new_conversation.d.ts +3 -4
- package/build/hooks/groups/use_group_members_for_new_conversation.d.ts.map +1 -1
- package/build/hooks/index.d.ts +0 -1
- package/build/hooks/index.d.ts.map +1 -1
- package/build/hooks/index.js +0 -1
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/use_conversation_messages.d.ts +5 -14
- package/build/hooks/use_conversation_messages.d.ts.map +1 -1
- package/build/hooks/use_conversation_messages.js +42 -218
- package/build/hooks/use_conversation_messages.js.map +1 -1
- package/build/hooks/use_conversation_messages_jolt_events.d.ts.map +1 -1
- package/build/hooks/use_conversation_messages_jolt_events.js +42 -58
- package/build/hooks/use_conversation_messages_jolt_events.js.map +1 -1
- package/build/hooks/use_features.d.ts +1 -2
- package/build/hooks/use_features.d.ts.map +1 -1
- package/build/hooks/use_features.js +1 -2
- package/build/hooks/use_features.js.map +1 -1
- package/build/hooks/use_mark_latest_message_read.d.ts +1 -2
- package/build/hooks/use_mark_latest_message_read.d.ts.map +1 -1
- package/build/hooks/use_mark_latest_message_read.js +3 -4
- package/build/hooks/use_mark_latest_message_read.js.map +1 -1
- package/build/hooks/use_read_receipts.d.ts +3 -4
- package/build/hooks/use_read_receipts.d.ts.map +1 -1
- package/build/hooks/use_suspense_api.d.ts +6 -10
- package/build/hooks/use_suspense_api.d.ts.map +1 -1
- package/build/hooks/use_suspense_api.js +63 -83
- package/build/hooks/use_suspense_api.js.map +1 -1
- package/build/screens/conversation_new/components/services_form.js +8 -9
- package/build/screens/conversation_new/components/services_form.js.map +1 -1
- package/build/screens/conversation_screen.d.ts +0 -1
- package/build/screens/conversation_screen.d.ts.map +1 -1
- package/build/screens/conversation_screen.js +203 -305
- package/build/screens/conversation_screen.js.map +1 -1
- package/build/screens/message_actions_screen.d.ts.map +1 -1
- package/build/screens/message_actions_screen.js +92 -103
- package/build/screens/message_actions_screen.js.map +1 -1
- package/build/screens/notification_settings/hooks/groups.d.ts +3 -4
- package/build/screens/notification_settings/hooks/groups.d.ts.map +1 -1
- package/build/types/api_primitives.d.ts +0 -1
- package/build/types/api_primitives.d.ts.map +1 -1
- package/build/types/api_primitives.js.map +1 -1
- package/build/types/resources/member.d.ts +0 -1
- package/build/types/resources/member.d.ts.map +1 -1
- package/build/types/resources/member.js.map +1 -1
- package/build/utils/cache/messages_cache.d.ts +0 -1
- package/build/utils/cache/messages_cache.d.ts.map +1 -1
- package/build/utils/cache/messages_cache.js +1 -37
- package/build/utils/cache/messages_cache.js.map +1 -1
- package/build/utils/client/types.d.ts +0 -1
- package/build/utils/client/types.d.ts.map +1 -1
- package/build/utils/client/types.js.map +1 -1
- package/build/utils/group_messages.js +1 -4
- package/build/utils/group_messages.js.map +1 -1
- package/package.json +3 -3
- package/src/__tests__/hooks/use_features.test.ts +2 -10
- package/src/__utils__/query_client.ts +0 -3
- package/src/components/conversation/message_form.tsx +3 -31
- package/src/components/conversation/message_list.tsx +4 -88
- package/src/hooks/__tests__/use_message_create_or_update.test.tsx +7 -2
- package/src/hooks/index.ts +0 -1
- package/src/hooks/use_conversation_messages.ts +17 -103
- package/src/hooks/use_conversation_messages_jolt_events.ts +2 -12
- package/src/hooks/use_features.ts +2 -3
- package/src/hooks/use_mark_latest_message_read.ts +3 -4
- package/src/hooks/use_suspense_api.ts +6 -14
- package/src/screens/conversation_new/components/services_form.tsx +5 -5
- package/src/screens/conversation_screen.tsx +13 -62
- package/src/screens/message_actions_screen.tsx +1 -12
- package/src/types/api_primitives.ts +0 -1
- package/src/types/resources/member.ts +0 -1
- package/src/utils/__tests__/group_messages.test.ts +0 -29
- package/src/utils/cache/__tests__/messages_cache.test.ts +1 -2
- package/src/utils/cache/__tests__/messages_cache_reply_roots.test.ts +2 -3
- package/src/utils/cache/messages_cache.ts +1 -45
- package/src/utils/client/types.ts +0 -1
- package/src/utils/group_messages.ts +1 -4
- package/build/components/conversation/missing_message.d.ts +0 -2
- package/build/components/conversation/missing_message.d.ts.map +0 -1
- package/build/components/conversation/missing_message.js +0 -139
- package/build/components/conversation/missing_message.js.map +0 -1
- package/build/hooks/use_direct_message_eligibility.d.ts +0 -14
- package/build/hooks/use_direct_message_eligibility.d.ts.map +0 -1
- package/build/hooks/use_direct_message_eligibility.js +0 -87
- package/build/hooks/use_direct_message_eligibility.js.map +0 -1
- package/build/utils/cache/messages_window.d.ts +0 -11
- package/build/utils/cache/messages_window.d.ts.map +0 -1
- package/build/utils/cache/messages_window.js +0 -51
- package/build/utils/cache/messages_window.js.map +0 -1
- package/src/__tests__/hooks/use_direct_message_eligibility.test.tsx +0 -83
- package/src/__tests__/screens/conversation_new/components/services_form.test.tsx +0 -91
- package/src/components/conversation/missing_message.tsx +0 -66
- package/src/hooks/__tests__/use_conversation_messages.test.tsx +0 -333
- package/src/hooks/__tests__/use_conversation_messages_jolt_events.test.tsx +0 -87
- package/src/hooks/__tests__/use_mark_latest_message_read.test.tsx +0 -33
- package/src/hooks/use_direct_message_eligibility.ts +0 -40
- package/src/utils/cache/__tests__/messages_cache_deletion.test.ts +0 -97
- package/src/utils/cache/__tests__/messages_window.test.ts +0 -78
- 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 {
|
|
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(
|
|
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] !==
|
|
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] =
|
|
125
|
-
$[2] =
|
|
126
|
-
$[3] = t1;
|
|
121
|
+
$[1] = reply_root_id;
|
|
122
|
+
$[2] = t1;
|
|
127
123
|
} else {
|
|
128
|
-
t1 = $[
|
|
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 ($[
|
|
132
|
+
if ($[3] !== conversation_id) {
|
|
140
133
|
t2 = {
|
|
141
134
|
conversationId: conversation_id
|
|
142
135
|
};
|
|
143
|
-
$[
|
|
144
|
-
$[
|
|
136
|
+
$[3] = conversation_id;
|
|
137
|
+
$[4] = t2;
|
|
145
138
|
} else {
|
|
146
|
-
t2 = $[
|
|
139
|
+
t2 = $[4];
|
|
147
140
|
}
|
|
148
141
|
useConversationJoltEvents(t2);
|
|
149
142
|
let t3;
|
|
150
|
-
if ($[
|
|
143
|
+
if ($[5] !== conversation_id) {
|
|
151
144
|
t3 = {
|
|
152
145
|
conversationId: conversation_id
|
|
153
146
|
};
|
|
154
|
-
$[
|
|
155
|
-
$[
|
|
147
|
+
$[5] = conversation_id;
|
|
148
|
+
$[6] = t3;
|
|
156
149
|
} else {
|
|
157
|
-
t3 = $[
|
|
150
|
+
t3 = $[6];
|
|
158
151
|
}
|
|
159
152
|
useConversationMessagesJoltEvents(t3);
|
|
160
153
|
const {
|
|
161
154
|
markHandledByMessageForm
|
|
162
155
|
} = useVideoModerationJoltEvents();
|
|
163
156
|
useEnsureConversationsRouteExists();
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
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
|
-
$[
|
|
173
|
-
$[
|
|
174
|
-
$[
|
|
175
|
-
$[11] = t5;
|
|
163
|
+
$[7] = conversation;
|
|
164
|
+
$[8] = messages;
|
|
165
|
+
$[9] = t4;
|
|
176
166
|
} else {
|
|
177
|
-
|
|
167
|
+
t4 = $[9];
|
|
178
168
|
}
|
|
179
|
-
useMarkLatestMessageRead(
|
|
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
|
|
190
|
-
if ($[
|
|
191
|
-
let
|
|
192
|
-
if ($[
|
|
193
|
-
|
|
194
|
-
$[
|
|
195
|
-
$[
|
|
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
|
-
|
|
187
|
+
t6 = $[14];
|
|
198
188
|
}
|
|
199
|
-
|
|
200
|
-
$[
|
|
201
|
-
$[
|
|
202
|
-
$[
|
|
189
|
+
t5 = messages.find(t6);
|
|
190
|
+
$[10] = editing_message_id;
|
|
191
|
+
$[11] = messages;
|
|
192
|
+
$[12] = t5;
|
|
203
193
|
} else {
|
|
204
|
-
|
|
194
|
+
t5 = $[12];
|
|
205
195
|
}
|
|
206
|
-
const currentlyEditingMessage =
|
|
207
|
-
let
|
|
208
|
-
if ($[
|
|
209
|
-
|
|
210
|
-
$[
|
|
211
|
-
$[
|
|
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
|
-
|
|
203
|
+
t6 = $[16];
|
|
214
204
|
}
|
|
215
|
-
const replyRootAuthorFirstName =
|
|
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
|
|
221
|
-
if ($[
|
|
222
|
-
|
|
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
|
-
$[
|
|
216
|
+
$[17] = t7;
|
|
227
217
|
} else {
|
|
228
|
-
|
|
218
|
+
t7 = $[17];
|
|
229
219
|
}
|
|
230
|
-
const trackScroll =
|
|
231
|
-
let
|
|
232
|
-
if ($[
|
|
233
|
-
|
|
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
|
-
$[
|
|
227
|
+
$[18] = t8;
|
|
238
228
|
} else {
|
|
239
|
-
|
|
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(
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
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
|
-
$[
|
|
268
|
-
$[
|
|
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
|
-
|
|
248
|
+
t9 = $[20];
|
|
288
249
|
}
|
|
289
|
-
const
|
|
290
|
-
let
|
|
291
|
-
if ($[
|
|
292
|
-
|
|
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
|
-
$[
|
|
307
|
-
$[
|
|
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] =
|
|
313
|
-
$[35] =
|
|
314
|
-
|
|
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
|
-
|
|
368
|
-
t19 = $[51];
|
|
291
|
+
t12 = $[36];
|
|
369
292
|
}
|
|
370
|
-
useEffect(
|
|
293
|
+
useEffect(t10, t12);
|
|
371
294
|
if (!conversation || conversation.deleted) {
|
|
372
|
-
let
|
|
373
|
-
if ($[
|
|
374
|
-
|
|
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
|
-
$[
|
|
300
|
+
$[37] = t13;
|
|
378
301
|
} else {
|
|
379
|
-
|
|
302
|
+
t13 = $[37];
|
|
380
303
|
}
|
|
381
|
-
let
|
|
382
|
-
if ($[
|
|
383
|
-
|
|
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
|
-
$[
|
|
311
|
+
$[38] = t14;
|
|
389
312
|
} else {
|
|
390
|
-
|
|
313
|
+
t14 = $[38];
|
|
391
314
|
}
|
|
392
|
-
let
|
|
393
|
-
if ($[
|
|
394
|
-
|
|
395
|
-
children: [
|
|
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
|
-
$[
|
|
403
|
-
$[
|
|
325
|
+
$[39] = navigation.goBack;
|
|
326
|
+
$[40] = t15;
|
|
404
327
|
} else {
|
|
405
|
-
|
|
328
|
+
t15 = $[40];
|
|
406
329
|
}
|
|
407
|
-
let
|
|
408
|
-
if ($[
|
|
409
|
-
|
|
330
|
+
let t16;
|
|
331
|
+
if ($[41] !== styles.container || $[42] !== t15) {
|
|
332
|
+
t16 = /*#__PURE__*/_jsx(View, {
|
|
410
333
|
style: styles.container,
|
|
411
|
-
children:
|
|
334
|
+
children: t15
|
|
412
335
|
});
|
|
413
|
-
$[
|
|
414
|
-
$[
|
|
415
|
-
$[
|
|
336
|
+
$[41] = styles.container;
|
|
337
|
+
$[42] = t15;
|
|
338
|
+
$[43] = t16;
|
|
416
339
|
} else {
|
|
417
|
-
|
|
340
|
+
t16 = $[43];
|
|
418
341
|
}
|
|
419
|
-
return
|
|
342
|
+
return t16;
|
|
420
343
|
}
|
|
421
|
-
let
|
|
422
|
-
if ($[
|
|
423
|
-
|
|
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
|
-
$[
|
|
447
|
-
$[
|
|
448
|
-
$[
|
|
449
|
-
$[
|
|
450
|
-
$[
|
|
451
|
-
$[
|
|
452
|
-
$[
|
|
453
|
-
$[
|
|
454
|
-
$[
|
|
455
|
-
$[
|
|
456
|
-
$[
|
|
457
|
-
$[
|
|
458
|
-
$[
|
|
459
|
-
|
|
460
|
-
$[
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
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
|
-
$[
|
|
483
|
-
$[
|
|
484
|
-
$[
|
|
388
|
+
$[57] = handleReturnToBottom;
|
|
389
|
+
$[58] = showJumpToBottomButton;
|
|
390
|
+
$[59] = t14;
|
|
485
391
|
} else {
|
|
486
|
-
|
|
392
|
+
t14 = $[59];
|
|
487
393
|
}
|
|
488
|
-
let
|
|
489
|
-
if ($[
|
|
490
|
-
|
|
491
|
-
$[
|
|
492
|
-
$[
|
|
394
|
+
let t15;
|
|
395
|
+
if ($[60] !== noMessages) {
|
|
396
|
+
t15 = !noMessages && /*#__PURE__*/_jsx(TypingIndicator, {});
|
|
397
|
+
$[60] = noMessages;
|
|
398
|
+
$[61] = t15;
|
|
493
399
|
} else {
|
|
494
|
-
|
|
400
|
+
t15 = $[61];
|
|
495
401
|
}
|
|
496
|
-
let
|
|
497
|
-
if ($[
|
|
498
|
-
|
|
499
|
-
$[
|
|
500
|
-
$[
|
|
402
|
+
let t16;
|
|
403
|
+
if ($[62] !== showLeaderDisabledReplyBanner) {
|
|
404
|
+
t16 = showLeaderDisabledReplyBanner && /*#__PURE__*/_jsx(LeaderMessagesDisabledBanner, {});
|
|
405
|
+
$[62] = showLeaderDisabledReplyBanner;
|
|
406
|
+
$[63] = t16;
|
|
501
407
|
} else {
|
|
502
|
-
|
|
408
|
+
t16 = $[63];
|
|
503
409
|
}
|
|
504
|
-
let
|
|
505
|
-
if ($[
|
|
506
|
-
|
|
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
|
-
$[
|
|
516
|
-
$[
|
|
517
|
-
$[
|
|
518
|
-
$[
|
|
519
|
-
$[
|
|
520
|
-
$[
|
|
521
|
-
$[
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
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
|
-
$[
|
|
532
|
-
$[
|
|
533
|
-
$[
|
|
534
|
-
$[
|
|
535
|
-
$[
|
|
536
|
-
$[
|
|
537
|
-
} else {
|
|
538
|
-
|
|
539
|
-
}
|
|
540
|
-
let
|
|
541
|
-
if ($[
|
|
542
|
-
|
|
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:
|
|
448
|
+
children: t18
|
|
545
449
|
});
|
|
546
|
-
$[
|
|
547
|
-
$[
|
|
548
|
-
$[
|
|
450
|
+
$[77] = styles.container;
|
|
451
|
+
$[78] = t18;
|
|
452
|
+
$[79] = t19;
|
|
549
453
|
} else {
|
|
550
|
-
|
|
454
|
+
t19 = $[79];
|
|
551
455
|
}
|
|
552
|
-
return
|
|
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(
|
|
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] !==
|
|
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] =
|
|
629
|
-
$[11] =
|
|
630
|
-
$[12] =
|
|
631
|
-
$[13] =
|
|
632
|
-
$[14] =
|
|
633
|
-
$[15] = t6;
|
|
527
|
+
$[10] = onFlaggedInMessageForm;
|
|
528
|
+
$[11] = replyRootAuthorFirstName;
|
|
529
|
+
$[12] = replyRootId;
|
|
530
|
+
$[13] = t1;
|
|
531
|
+
$[14] = t6;
|
|
634
532
|
} else {
|
|
635
|
-
t6 = $[
|
|
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(
|
|
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
|
|
789
|
+
function _temp(r) {
|
|
892
790
|
return r.name === "Conversations";
|
|
893
791
|
}
|
|
894
792
|
//# sourceMappingURL=conversation_screen.js.map
|