@planningcenter/chat-react-native 4.2.1-qa-staging.7 → 4.2.1-qa-staging.9
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 -1
- package/build/components/conversation/message_form.d.ts.map +1 -1
- package/build/components/conversation/message_form.js +167 -373
- package/build/components/conversation/message_form.js.map +1 -1
- package/build/components/conversation/message_list.d.ts +4 -2
- package/build/components/conversation/message_list.d.ts.map +1 -1
- package/build/components/conversation/message_list.js +115 -81
- package/build/components/conversation/message_list.js.map +1 -1
- package/build/components/conversation/missing_message.d.ts +2 -0
- package/build/components/conversation/missing_message.d.ts.map +1 -0
- package/build/components/conversation/missing_message.js +139 -0
- package/build/components/conversation/missing_message.js.map +1 -0
- package/build/contexts/api_provider.d.ts.map +1 -1
- package/build/contexts/api_provider.js +1 -2
- package/build/contexts/api_provider.js.map +1 -1
- package/build/contexts/conversation_context.d.ts +1 -3
- package/build/contexts/conversation_context.d.ts.map +1 -1
- package/build/contexts/conversation_context.js +18 -23
- package/build/contexts/conversation_context.js.map +1 -1
- package/build/hooks/groups/use_group_members_for_new_conversation.d.ts +4 -3
- package/build/hooks/groups/use_group_members_for_new_conversation.d.ts.map +1 -1
- package/build/hooks/paginator_meta.d.ts +1 -3
- package/build/hooks/paginator_meta.d.ts.map +1 -1
- package/build/hooks/paginator_meta.js +8 -25
- package/build/hooks/paginator_meta.js.map +1 -1
- package/build/hooks/use_api.d.ts.map +1 -1
- package/build/hooks/use_api.js +8 -5
- package/build/hooks/use_api.js.map +1 -1
- package/build/hooks/use_conversation_messages.d.ts +10 -8
- package/build/hooks/use_conversation_messages.d.ts.map +1 -1
- package/build/hooks/use_conversation_messages.js +218 -81
- package/build/hooks/use_conversation_messages.js.map +1 -1
- package/build/hooks/use_conversation_messages_jolt_events.d.ts +1 -17
- package/build/hooks/use_conversation_messages_jolt_events.d.ts.map +1 -1
- package/build/hooks/use_conversation_messages_jolt_events.js +90 -83
- package/build/hooks/use_conversation_messages_jolt_events.js.map +1 -1
- package/build/hooks/use_features.d.ts +2 -1
- package/build/hooks/use_features.d.ts.map +1 -1
- package/build/hooks/use_features.js +2 -1
- package/build/hooks/use_features.js.map +1 -1
- package/build/hooks/use_message_create_or_update.d.ts.map +1 -1
- package/build/hooks/use_message_create_or_update.js +80 -91
- package/build/hooks/use_message_create_or_update.js.map +1 -1
- package/build/hooks/use_message_reaction_toggle.d.ts.map +1 -1
- package/build/hooks/use_message_reaction_toggle.js +40 -45
- package/build/hooks/use_message_reaction_toggle.js.map +1 -1
- package/build/hooks/use_read_receipts.d.ts +4 -3
- package/build/hooks/use_read_receipts.d.ts.map +1 -1
- package/build/hooks/use_suspense_api.d.ts +10 -6
- package/build/hooks/use_suspense_api.d.ts.map +1 -1
- package/build/hooks/use_suspense_api.js +88 -65
- package/build/hooks/use_suspense_api.js.map +1 -1
- package/build/screens/conversation_screen.d.ts +1 -1
- package/build/screens/conversation_screen.d.ts.map +1 -1
- package/build/screens/conversation_screen.js +338 -463
- 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 +26 -21
- package/build/screens/message_actions_screen.js.map +1 -1
- package/build/screens/message_report_screen.d.ts.map +1 -1
- package/build/screens/message_report_screen.js +44 -17
- package/build/screens/message_report_screen.js.map +1 -1
- package/build/screens/notification_settings/hooks/groups.d.ts +4 -3
- package/build/screens/notification_settings/hooks/groups.d.ts.map +1 -1
- package/build/screens/reactions_screen.d.ts.map +1 -1
- package/build/screens/reactions_screen.js +88 -70
- package/build/screens/reactions_screen.js.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/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 +0 -3
- package/build/utils/cache/messages_cache.js.map +1 -1
- package/build/utils/cache/messages_window.d.ts +11 -0
- package/build/utils/cache/messages_window.d.ts.map +1 -0
- package/build/utils/cache/messages_window.js +51 -0
- package/build/utils/cache/messages_window.js.map +1 -0
- package/build/utils/cache/optimistically_update_message.d.ts +1 -2
- package/build/utils/cache/optimistically_update_message.d.ts.map +1 -1
- package/build/utils/cache/optimistically_update_message.js +4 -4
- package/build/utils/cache/optimistically_update_message.js.map +1 -1
- package/build/utils/generate_placeholder_ulid.d.ts +6 -0
- package/build/utils/generate_placeholder_ulid.d.ts.map +1 -1
- package/build/utils/generate_placeholder_ulid.js +2 -2
- package/build/utils/generate_placeholder_ulid.js.map +1 -1
- package/build/utils/request/get_messages.d.ts +6 -18
- package/build/utils/request/get_messages.d.ts.map +1 -1
- package/build/utils/request/get_messages.js +12 -10
- package/build/utils/request/get_messages.js.map +1 -1
- package/package.json +3 -3
- package/src/__tests__/hooks/paginator_meta.test.ts +2 -73
- package/src/__tests__/hooks/use_features.test.ts +10 -2
- package/src/__utils__/query_client.ts +3 -0
- package/src/components/conversation/__tests__/message_list.test.tsx +0 -42
- package/src/components/conversation/message_form.tsx +30 -5
- package/src/components/conversation/message_list.tsx +44 -14
- package/src/components/conversation/missing_message.tsx +66 -0
- package/src/contexts/api_provider.tsx +1 -2
- package/src/contexts/conversation_context.tsx +1 -6
- package/src/hooks/__tests__/use_conversation_messages.test.tsx +333 -0
- package/src/hooks/__tests__/use_conversation_messages_jolt_events.test.tsx +87 -0
- package/src/hooks/__tests__/use_mark_latest_message_read.test.tsx +33 -0
- package/src/hooks/__tests__/use_message_create_or_update.test.tsx +2 -7
- package/src/hooks/paginator_meta.ts +5 -29
- package/src/hooks/use_api.ts +5 -4
- package/src/hooks/use_conversation_messages.ts +88 -43
- package/src/hooks/use_conversation_messages_jolt_events.ts +53 -62
- package/src/hooks/use_features.ts +3 -2
- package/src/hooks/use_message_create_or_update.ts +8 -8
- package/src/hooks/use_message_reaction_toggle.ts +1 -3
- package/src/hooks/use_suspense_api.ts +17 -8
- package/src/screens/conversation_screen.tsx +63 -123
- package/src/screens/message_actions_screen.tsx +5 -3
- package/src/screens/message_report_screen.tsx +3 -2
- package/src/screens/reactions_screen.tsx +4 -2
- package/src/types/api_primitives.ts +0 -1
- package/src/utils/cache/__tests__/messages_cache.test.ts +3 -15
- package/src/utils/cache/__tests__/messages_cache_deletion.test.ts +2 -1
- package/src/utils/cache/__tests__/messages_cache_reply_roots.test.ts +3 -2
- package/src/utils/cache/__tests__/messages_window.test.ts +78 -0
- package/src/utils/cache/messages_cache.ts +0 -3
- package/src/utils/cache/messages_window.ts +55 -0
- package/src/utils/cache/optimistically_update_message.ts +5 -2
- package/src/utils/generate_placeholder_ulid.ts +2 -2
- package/src/utils/request/get_messages.ts +14 -12
- package/build/components/conversation/anchor_not_found_boundary.d.ts +0 -18
- package/build/components/conversation/anchor_not_found_boundary.d.ts.map +0 -1
- package/build/components/conversation/anchor_not_found_boundary.js +0 -20
- package/build/components/conversation/anchor_not_found_boundary.js.map +0 -1
- package/build/hooks/use_conversation_message_lookup.d.ts +0 -7
- package/build/hooks/use_conversation_message_lookup.d.ts.map +0 -1
- package/build/hooks/use_conversation_message_lookup.js +0 -52
- package/build/hooks/use_conversation_message_lookup.js.map +0 -1
- package/build/hooks/use_fetch_newer_messages.d.ts +0 -9
- package/build/hooks/use_fetch_newer_messages.d.ts.map +0 -1
- package/build/hooks/use_fetch_newer_messages.js +0 -69
- package/build/hooks/use_fetch_newer_messages.js.map +0 -1
- package/build/hooks/use_fetch_newer_on_foreground.d.ts +0 -8
- package/build/hooks/use_fetch_newer_on_foreground.d.ts.map +0 -1
- package/build/hooks/use_fetch_newer_on_foreground.js +0 -42
- package/build/hooks/use_fetch_newer_on_foreground.js.map +0 -1
- package/build/hooks/use_held_back_messages.d.ts +0 -11
- package/build/hooks/use_held_back_messages.d.ts.map +0 -1
- package/build/hooks/use_held_back_messages.js +0 -24
- package/build/hooks/use_held_back_messages.js.map +0 -1
- package/build/utils/cache/find_message_in_caches.d.ts +0 -4
- package/build/utils/cache/find_message_in_caches.d.ts.map +0 -1
- package/build/utils/cache/find_message_in_caches.js +0 -16
- package/build/utils/cache/find_message_in_caches.js.map +0 -1
- package/build/utils/cache/invalidate_refetchable_queries.d.ts +0 -3
- package/build/utils/cache/invalidate_refetchable_queries.d.ts.map +0 -1
- package/build/utils/cache/invalidate_refetchable_queries.js +0 -8
- package/build/utils/cache/invalidate_refetchable_queries.js.map +0 -1
- package/build/utils/cache/prepend_newer_page.d.ts +0 -7
- package/build/utils/cache/prepend_newer_page.d.ts.map +0 -1
- package/build/utils/cache/prepend_newer_page.js +0 -15
- package/build/utils/cache/prepend_newer_page.js.map +0 -1
- package/build/utils/gated_message_cache.d.ts +0 -7
- package/build/utils/gated_message_cache.d.ts.map +0 -1
- package/build/utils/gated_message_cache.js +0 -13
- package/build/utils/gated_message_cache.js.map +0 -1
- package/build/utils/ulid.d.ts +0 -3
- package/build/utils/ulid.d.ts.map +0 -1
- package/build/utils/ulid.js +0 -7
- package/build/utils/ulid.js.map +0 -1
- package/src/__tests__/hooks/use_conversation_messages.test.ts +0 -22
- package/src/__tests__/hooks/use_conversation_messages_jolt_events.test.ts +0 -33
- package/src/__tests__/utils/gated_message_cache.test.ts +0 -26
- package/src/__tests__/utils/request/get_messages.test.ts +0 -24
- package/src/__tests__/utils/ulid.test.ts +0 -15
- package/src/components/conversation/__tests__/anchor_not_found_boundary.test.tsx +0 -51
- package/src/components/conversation/anchor_not_found_boundary.tsx +0 -21
- package/src/hooks/__tests__/use_fetch_newer_messages.test.tsx +0 -95
- package/src/hooks/__tests__/use_held_back_messages.test.tsx +0 -60
- package/src/hooks/__tests__/use_message_reaction_toggle.test.tsx +0 -73
- package/src/hooks/use_conversation_message_lookup.ts +0 -29
- package/src/hooks/use_fetch_newer_messages.ts +0 -52
- package/src/hooks/use_fetch_newer_on_foreground.ts +0 -25
- package/src/hooks/use_held_back_messages.ts +0 -33
- package/src/utils/cache/__tests__/find_message_in_caches.test.ts +0 -37
- package/src/utils/cache/__tests__/invalidate_refetchable_queries.test.ts +0 -23
- package/src/utils/cache/__tests__/prepend_newer_page.test.ts +0 -34
- package/src/utils/cache/find_message_in_caches.ts +0 -20
- package/src/utils/cache/invalidate_refetchable_queries.ts +0 -9
- package/src/utils/cache/prepend_newer_page.ts +0 -19
- package/src/utils/gated_message_cache.ts +0 -19
- package/src/utils/ulid.ts +0 -11
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import { HeaderTitle, PlatformPressable } from '@react-navigation/elements';
|
|
3
3
|
import { CommonActions, useNavigation, useTheme as useNavigationTheme, useRoute } from '@react-navigation/native';
|
|
4
|
-
import React, {
|
|
4
|
+
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
5
5
|
import { Platform, StyleSheet, useWindowDimensions, View } from 'react-native';
|
|
6
6
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
7
7
|
import { Badge, Icon } from '../components';
|
|
8
|
-
import { AnchorNotFoundBoundary } from '../components/conversation/anchor_not_found_boundary';
|
|
9
8
|
import { ConversationStartBanner } from '../components/conversation/conversation_start_banner';
|
|
10
9
|
import { JumpToBottomButton } from '../components/conversation/jump_to_bottom_button';
|
|
11
10
|
import { MessageForm } from '../components/conversation/message_form';
|
|
@@ -19,29 +18,22 @@ import { ConversationContextProvider } from '../contexts/conversation_context';
|
|
|
19
18
|
import { useMessageAvailableMembersAction } from '../hooks/direct_messages/use_message_available_members_action';
|
|
20
19
|
import { useConversation } from '../hooks/use_conversation';
|
|
21
20
|
import { useConversationJoltEvents } from '../hooks/use_conversation_jolt_events';
|
|
22
|
-
import { useConversationMessages } from '../hooks/use_conversation_messages';
|
|
21
|
+
import { dropMessagesWindowIfBehind, useConversationMessages } from '../hooks/use_conversation_messages';
|
|
23
22
|
import { useConversationMessagesJoltEvents } from '../hooks/use_conversation_messages_jolt_events';
|
|
24
|
-
import { useFetchNewerMessages } from '../hooks/use_fetch_newer_messages';
|
|
25
|
-
import { useFetchNewerOnForeground } from '../hooks/use_fetch_newer_on_foreground';
|
|
26
|
-
import { useHeldBackMessages } from '../hooks/use_held_back_messages';
|
|
27
23
|
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 {
|
|
32
|
-
import { gatedMessageCache } from '../utils/gated_message_cache';
|
|
33
|
-
import { getMessagesQueryKey } from '../utils/request/get_messages';
|
|
34
|
-
import { decodeUlidTime } from '../utils/ulid';
|
|
27
|
+
import { Log } from '../utils';
|
|
35
28
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
36
29
|
export function ConversationScreen(t0) {
|
|
37
|
-
const $ = _c(
|
|
30
|
+
const $ = _c(13);
|
|
38
31
|
const {
|
|
39
32
|
route
|
|
40
33
|
} = t0;
|
|
41
34
|
const {
|
|
42
35
|
conversation_id,
|
|
43
|
-
reply_root_id
|
|
44
|
-
initial_message_id
|
|
36
|
+
reply_root_id
|
|
45
37
|
} = route.params;
|
|
46
38
|
let t1;
|
|
47
39
|
if ($[0] !== conversation_id) {
|
|
@@ -57,111 +49,57 @@ export function ConversationScreen(t0) {
|
|
|
57
49
|
data: conversation
|
|
58
50
|
} = useConversation(t1);
|
|
59
51
|
let t2;
|
|
60
|
-
if ($[2] !== conversation
|
|
61
|
-
t2 = (
|
|
62
|
-
$[2] = conversation
|
|
63
|
-
$[3] =
|
|
64
|
-
$[4] = t2;
|
|
52
|
+
if ($[2] !== conversation) {
|
|
53
|
+
t2 = normalizeAnalyticsMetadata(conversation);
|
|
54
|
+
$[2] = conversation;
|
|
55
|
+
$[3] = t2;
|
|
65
56
|
} else {
|
|
66
|
-
t2 = $[
|
|
57
|
+
t2 = $[3];
|
|
67
58
|
}
|
|
68
|
-
const [anchor, setAnchor] = useState(t2);
|
|
69
59
|
let t3;
|
|
70
|
-
if ($[5]
|
|
71
|
-
t3 =
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
79
|
-
t4 = () => setAnchor(null);
|
|
80
|
-
$[6] = t4;
|
|
60
|
+
if ($[4] !== reply_root_id || $[5] !== t2) {
|
|
61
|
+
t3 = {
|
|
62
|
+
reply_root_id,
|
|
63
|
+
...t2
|
|
64
|
+
};
|
|
65
|
+
$[4] = reply_root_id;
|
|
66
|
+
$[5] = t2;
|
|
67
|
+
$[6] = t3;
|
|
81
68
|
} else {
|
|
82
|
-
|
|
69
|
+
t3 = $[6];
|
|
83
70
|
}
|
|
84
|
-
|
|
71
|
+
usePublishProductAnalyticsEvent(analyticsEvents.conversation_show_opened, t3);
|
|
72
|
+
const t4 = reply_root_id ?? null;
|
|
85
73
|
let t5;
|
|
86
|
-
if ($[7] !==
|
|
87
|
-
t5 =
|
|
88
|
-
|
|
74
|
+
if ($[7] !== route) {
|
|
75
|
+
t5 = /*#__PURE__*/_jsx(ConversationScreenContent, {
|
|
76
|
+
route: route
|
|
77
|
+
});
|
|
78
|
+
$[7] = route;
|
|
89
79
|
$[8] = t5;
|
|
90
80
|
} else {
|
|
91
81
|
t5 = $[8];
|
|
92
82
|
}
|
|
93
83
|
let t6;
|
|
94
|
-
if ($[9] !==
|
|
95
|
-
t6 = {
|
|
96
|
-
reply_root_id,
|
|
97
|
-
...t5
|
|
98
|
-
};
|
|
99
|
-
$[9] = reply_root_id;
|
|
100
|
-
$[10] = t5;
|
|
101
|
-
$[11] = t6;
|
|
102
|
-
} else {
|
|
103
|
-
t6 = $[11];
|
|
104
|
-
}
|
|
105
|
-
usePublishProductAnalyticsEvent(analyticsEvents.conversation_show_opened, t6);
|
|
106
|
-
const t7 = reply_root_id ?? null;
|
|
107
|
-
let t8;
|
|
108
|
-
if ($[12] !== anchor || $[13] !== conversation_id || $[14] !== reply_root_id) {
|
|
109
|
-
t8 = getMessagesQueryKey({
|
|
110
|
-
conversation_id,
|
|
111
|
-
reply_root_id,
|
|
112
|
-
anchor
|
|
113
|
-
});
|
|
114
|
-
$[12] = anchor;
|
|
115
|
-
$[13] = conversation_id;
|
|
116
|
-
$[14] = reply_root_id;
|
|
117
|
-
$[15] = t8;
|
|
118
|
-
} else {
|
|
119
|
-
t8 = $[15];
|
|
120
|
-
}
|
|
121
|
-
let t9;
|
|
122
|
-
if ($[16] !== anchor || $[17] !== route) {
|
|
123
|
-
t9 = anchor ? /*#__PURE__*/_jsx(AnchorNotFoundBoundary, {
|
|
124
|
-
onAnchorNotFound: dropAnchor,
|
|
125
|
-
children: /*#__PURE__*/_jsx(ConversationScreenContent, {
|
|
126
|
-
route: route,
|
|
127
|
-
anchor: anchor,
|
|
128
|
-
onExitAnchoredMode: exitAnchoredMode
|
|
129
|
-
})
|
|
130
|
-
}) : /*#__PURE__*/_jsx(ConversationScreenContent, {
|
|
131
|
-
route: route,
|
|
132
|
-
anchor: null,
|
|
133
|
-
onExitAnchoredMode: exitAnchoredMode
|
|
134
|
-
});
|
|
135
|
-
$[16] = anchor;
|
|
136
|
-
$[17] = route;
|
|
137
|
-
$[18] = t9;
|
|
138
|
-
} else {
|
|
139
|
-
t9 = $[18];
|
|
140
|
-
}
|
|
141
|
-
let t10;
|
|
142
|
-
if ($[19] !== conversation_id || $[20] !== t7 || $[21] !== t8 || $[22] !== t9) {
|
|
143
|
-
t10 = /*#__PURE__*/_jsx(ConversationContextProvider, {
|
|
84
|
+
if ($[9] !== conversation_id || $[10] !== t4 || $[11] !== t5) {
|
|
85
|
+
t6 = /*#__PURE__*/_jsx(ConversationContextProvider, {
|
|
144
86
|
conversationId: conversation_id,
|
|
145
|
-
currentPageReplyRootId:
|
|
146
|
-
|
|
147
|
-
children: t9
|
|
87
|
+
currentPageReplyRootId: t4,
|
|
88
|
+
children: t5
|
|
148
89
|
});
|
|
149
|
-
$[
|
|
150
|
-
$[
|
|
151
|
-
$[
|
|
152
|
-
$[
|
|
153
|
-
$[23] = t10;
|
|
90
|
+
$[9] = conversation_id;
|
|
91
|
+
$[10] = t4;
|
|
92
|
+
$[11] = t5;
|
|
93
|
+
$[12] = t6;
|
|
154
94
|
} else {
|
|
155
|
-
|
|
95
|
+
t6 = $[12];
|
|
156
96
|
}
|
|
157
|
-
return
|
|
97
|
+
return t6;
|
|
158
98
|
}
|
|
159
99
|
function ConversationScreenContent(t0) {
|
|
160
|
-
const $ = _c(
|
|
100
|
+
const $ = _c(103);
|
|
161
101
|
const {
|
|
162
|
-
route
|
|
163
|
-
anchor,
|
|
164
|
-
onExitAnchoredMode
|
|
102
|
+
route
|
|
165
103
|
} = t0;
|
|
166
104
|
const styles = useStyles();
|
|
167
105
|
const navigation = useNavigation();
|
|
@@ -169,21 +107,21 @@ function ConversationScreenContent(t0) {
|
|
|
169
107
|
conversation_id,
|
|
170
108
|
editing_message_id,
|
|
171
109
|
reply_root_id,
|
|
172
|
-
reply_root_author_name
|
|
110
|
+
reply_root_author_name,
|
|
111
|
+
initial_message_id
|
|
173
112
|
} = route.params;
|
|
174
113
|
const {
|
|
175
114
|
data: conversation
|
|
176
115
|
} = useConversation(route.params);
|
|
177
|
-
const anchored = !!anchor;
|
|
178
116
|
let t1;
|
|
179
|
-
if ($[0] !==
|
|
117
|
+
if ($[0] !== conversation_id || $[1] !== initial_message_id || $[2] !== reply_root_id) {
|
|
180
118
|
t1 = {
|
|
181
119
|
conversation_id,
|
|
182
120
|
reply_root_id,
|
|
183
|
-
anchor
|
|
121
|
+
anchor: initial_message_id
|
|
184
122
|
};
|
|
185
|
-
$[0] =
|
|
186
|
-
$[1] =
|
|
123
|
+
$[0] = conversation_id;
|
|
124
|
+
$[1] = initial_message_id;
|
|
187
125
|
$[2] = reply_root_id;
|
|
188
126
|
$[3] = t1;
|
|
189
127
|
} else {
|
|
@@ -191,141 +129,54 @@ function ConversationScreenContent(t0) {
|
|
|
191
129
|
}
|
|
192
130
|
const {
|
|
193
131
|
messages,
|
|
132
|
+
behind,
|
|
194
133
|
fetchNextPage,
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
isFetchingPreviousPage,
|
|
199
|
-
queryKey
|
|
134
|
+
fetchNewer,
|
|
135
|
+
fetchLiveWindow,
|
|
136
|
+
hasNextPage
|
|
200
137
|
} = useConversationMessages(t1);
|
|
201
|
-
const behindLatest = anchored && hasPreviousPage;
|
|
202
|
-
const caughtUp = !hasPreviousPage;
|
|
203
|
-
const [showJumpToBottomButton, setShowJumpToBottomButton] = useState(false);
|
|
204
|
-
const readingHistory = showJumpToBottomButton;
|
|
205
138
|
let t2;
|
|
206
|
-
if ($[4] !==
|
|
207
|
-
t2 =
|
|
208
|
-
|
|
139
|
+
if ($[4] !== conversation_id) {
|
|
140
|
+
t2 = {
|
|
141
|
+
conversationId: conversation_id
|
|
142
|
+
};
|
|
143
|
+
$[4] = conversation_id;
|
|
209
144
|
$[5] = t2;
|
|
210
145
|
} else {
|
|
211
146
|
t2 = $[5];
|
|
212
147
|
}
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
t4 = {
|
|
218
|
-
conversation_id,
|
|
219
|
-
reply_root_id,
|
|
220
|
-
queryKey,
|
|
221
|
-
onTooFarBehind: t3
|
|
222
|
-
};
|
|
223
|
-
$[6] = conversation_id;
|
|
224
|
-
$[7] = queryKey;
|
|
225
|
-
$[8] = reply_root_id;
|
|
226
|
-
$[9] = t3;
|
|
227
|
-
$[10] = t4;
|
|
228
|
-
} else {
|
|
229
|
-
t4 = $[10];
|
|
230
|
-
}
|
|
231
|
-
const fetchNewer = useFetchNewerMessages(t4);
|
|
232
|
-
let t5;
|
|
233
|
-
if ($[11] !== caughtUp || $[12] !== fetchNewer || $[13] !== newestMessageId || $[14] !== readingHistory) {
|
|
234
|
-
t5 = {
|
|
235
|
-
fetchNewer,
|
|
236
|
-
newestMessageId,
|
|
237
|
-
readingHistory,
|
|
238
|
-
caughtUp
|
|
239
|
-
};
|
|
240
|
-
$[11] = caughtUp;
|
|
241
|
-
$[12] = fetchNewer;
|
|
242
|
-
$[13] = newestMessageId;
|
|
243
|
-
$[14] = readingHistory;
|
|
244
|
-
$[15] = t5;
|
|
245
|
-
} else {
|
|
246
|
-
t5 = $[15];
|
|
247
|
-
}
|
|
248
|
-
const {
|
|
249
|
-
onSkippedNewMessage
|
|
250
|
-
} = useHeldBackMessages(t5);
|
|
251
|
-
let t6;
|
|
252
|
-
if ($[16] !== conversation_id) {
|
|
253
|
-
t6 = {
|
|
148
|
+
useConversationJoltEvents(t2);
|
|
149
|
+
let t3;
|
|
150
|
+
if ($[6] !== conversation_id) {
|
|
151
|
+
t3 = {
|
|
254
152
|
conversationId: conversation_id
|
|
255
153
|
};
|
|
256
|
-
$[
|
|
257
|
-
$[
|
|
258
|
-
} else {
|
|
259
|
-
t6 = $[17];
|
|
260
|
-
}
|
|
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({
|
|
267
|
-
queryKey,
|
|
268
|
-
acceptNewMessages: t8,
|
|
269
|
-
onSkippedNewMessage
|
|
270
|
-
});
|
|
271
|
-
$[18] = onSkippedNewMessage;
|
|
272
|
-
$[19] = queryKey;
|
|
273
|
-
$[20] = t8;
|
|
274
|
-
$[21] = t9;
|
|
275
|
-
} else {
|
|
276
|
-
t9 = $[21];
|
|
277
|
-
}
|
|
278
|
-
let t10;
|
|
279
|
-
if ($[22] !== conversation_id || $[23] !== t7 || $[24] !== t9) {
|
|
280
|
-
t10 = {
|
|
281
|
-
conversationId: conversation_id,
|
|
282
|
-
replyRootId: t7,
|
|
283
|
-
messageCache: t9
|
|
284
|
-
};
|
|
285
|
-
$[22] = conversation_id;
|
|
286
|
-
$[23] = t7;
|
|
287
|
-
$[24] = t9;
|
|
288
|
-
$[25] = t10;
|
|
154
|
+
$[6] = conversation_id;
|
|
155
|
+
$[7] = t3;
|
|
289
156
|
} else {
|
|
290
|
-
|
|
157
|
+
t3 = $[7];
|
|
291
158
|
}
|
|
292
|
-
useConversationMessagesJoltEvents(
|
|
159
|
+
useConversationMessagesJoltEvents(t3);
|
|
293
160
|
const {
|
|
294
161
|
markHandledByMessageForm
|
|
295
162
|
} = useVideoModerationJoltEvents();
|
|
296
163
|
useEnsureConversationsRouteExists();
|
|
297
|
-
const
|
|
298
|
-
let
|
|
299
|
-
if ($[
|
|
300
|
-
|
|
164
|
+
const t4 = !behind;
|
|
165
|
+
let t5;
|
|
166
|
+
if ($[8] !== conversation || $[9] !== messages || $[10] !== t4) {
|
|
167
|
+
t5 = {
|
|
301
168
|
conversation,
|
|
302
169
|
messages,
|
|
303
|
-
enabled:
|
|
304
|
-
};
|
|
305
|
-
$[26] = conversation;
|
|
306
|
-
$[27] = messages;
|
|
307
|
-
$[28] = t11;
|
|
308
|
-
$[29] = t12;
|
|
309
|
-
} else {
|
|
310
|
-
t12 = $[29];
|
|
311
|
-
}
|
|
312
|
-
useMarkLatestMessageRead(t12);
|
|
313
|
-
const t13 = anchored && caughtUp;
|
|
314
|
-
let t14;
|
|
315
|
-
if ($[30] !== fetchNewer || $[31] !== newestMessageId || $[32] !== t13) {
|
|
316
|
-
t14 = {
|
|
317
|
-
fetchNewer,
|
|
318
|
-
newestMessageId,
|
|
319
|
-
enabled: t13
|
|
170
|
+
enabled: t4
|
|
320
171
|
};
|
|
321
|
-
$[
|
|
322
|
-
$[
|
|
323
|
-
$[
|
|
324
|
-
$[
|
|
172
|
+
$[8] = conversation;
|
|
173
|
+
$[9] = messages;
|
|
174
|
+
$[10] = t4;
|
|
175
|
+
$[11] = t5;
|
|
325
176
|
} else {
|
|
326
|
-
|
|
177
|
+
t5 = $[11];
|
|
327
178
|
}
|
|
328
|
-
|
|
179
|
+
useMarkLatestMessageRead(t5);
|
|
329
180
|
const noMessages = messages.length === 0;
|
|
330
181
|
const {
|
|
331
182
|
repliesDisabled,
|
|
@@ -335,47 +186,57 @@ function ConversationScreenContent(t0) {
|
|
|
335
186
|
} = conversation;
|
|
336
187
|
const canReply = memberAbility?.canReply;
|
|
337
188
|
const showLeaderDisabledReplyBanner = canReply && repliesDisabled;
|
|
338
|
-
let
|
|
339
|
-
if ($[
|
|
340
|
-
let
|
|
341
|
-
if ($[
|
|
342
|
-
|
|
343
|
-
$[
|
|
344
|
-
$[
|
|
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;
|
|
345
196
|
} else {
|
|
346
|
-
|
|
197
|
+
t7 = $[16];
|
|
347
198
|
}
|
|
348
|
-
|
|
349
|
-
$[
|
|
350
|
-
$[
|
|
351
|
-
$[
|
|
199
|
+
t6 = messages.find(t7);
|
|
200
|
+
$[12] = editing_message_id;
|
|
201
|
+
$[13] = messages;
|
|
202
|
+
$[14] = t6;
|
|
352
203
|
} else {
|
|
353
|
-
|
|
204
|
+
t6 = $[14];
|
|
354
205
|
}
|
|
355
|
-
const currentlyEditingMessage =
|
|
356
|
-
let
|
|
357
|
-
if ($[
|
|
358
|
-
|
|
359
|
-
$[
|
|
360
|
-
$[
|
|
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;
|
|
361
212
|
} else {
|
|
362
|
-
|
|
213
|
+
t7 = $[18];
|
|
363
214
|
}
|
|
364
|
-
const replyRootAuthorFirstName =
|
|
215
|
+
const replyRootAuthorFirstName = t7;
|
|
365
216
|
const replyHeaderTitle = replyRootAuthorFirstName ? `Reply to ${replyRootAuthorFirstName}` : "Reply";
|
|
366
217
|
const muted = conversation.conversationMembership?.muted ?? conversation.muted;
|
|
367
218
|
const listRef = useRef(null);
|
|
368
|
-
const [
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
219
|
+
const [showJumpToBottomButton, setShowJumpToBottomButton] = useState(false);
|
|
220
|
+
let t8;
|
|
221
|
+
if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
|
|
222
|
+
t8 = event => {
|
|
223
|
+
const offsetY = event.nativeEvent.contentOffset.y;
|
|
224
|
+
setShowJumpToBottomButton(offsetY > 200);
|
|
225
|
+
};
|
|
226
|
+
$[19] = t8;
|
|
227
|
+
} else {
|
|
228
|
+
t8 = $[19];
|
|
229
|
+
}
|
|
230
|
+
const trackScroll = t8;
|
|
231
|
+
let t9;
|
|
232
|
+
if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
|
|
233
|
+
t9 = {
|
|
373
234
|
listRef,
|
|
374
235
|
enabled: Platform.OS === "ios"
|
|
375
236
|
};
|
|
376
|
-
$[
|
|
237
|
+
$[20] = t9;
|
|
377
238
|
} else {
|
|
378
|
-
|
|
239
|
+
t9 = $[20];
|
|
379
240
|
}
|
|
380
241
|
const {
|
|
381
242
|
restOffset,
|
|
@@ -383,82 +244,52 @@ function ConversationScreenContent(t0) {
|
|
|
383
244
|
onContentSizeChange,
|
|
384
245
|
onMomentumScrollEnd,
|
|
385
246
|
onScrollEndDrag
|
|
386
|
-
} = useRestAwayFromDismissEdge(
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
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();
|
|
390
262
|
listRef.current?.scrollToOffset({
|
|
391
|
-
offset: restOffset
|
|
263
|
+
offset: restOffset,
|
|
264
|
+
animated
|
|
392
265
|
});
|
|
393
266
|
};
|
|
394
|
-
$[
|
|
395
|
-
$[
|
|
396
|
-
} else {
|
|
397
|
-
t18 = $[43];
|
|
398
|
-
}
|
|
399
|
-
const handleReturnToBottom = t18;
|
|
400
|
-
let t19;
|
|
401
|
-
if ($[44] !== handleReturnToBottom || $[45] !== onExitAnchoredMode) {
|
|
402
|
-
t19 = () => {
|
|
403
|
-
onExitAnchoredMode();
|
|
404
|
-
handleReturnToBottom();
|
|
405
|
-
};
|
|
406
|
-
$[44] = handleReturnToBottom;
|
|
407
|
-
$[45] = onExitAnchoredMode;
|
|
408
|
-
$[46] = t19;
|
|
409
|
-
} else {
|
|
410
|
-
t19 = $[46];
|
|
411
|
-
}
|
|
412
|
-
const exitAnchoredMode = t19;
|
|
413
|
-
let t20;
|
|
414
|
-
if ($[47] !== anchored || $[48] !== exitAnchoredMode || $[49] !== handleReturnToBottom) {
|
|
415
|
-
t20 = () => {
|
|
416
|
-
setShowJumpToBottomButton(false);
|
|
417
|
-
if (anchored) {
|
|
418
|
-
exitAnchoredMode();
|
|
419
|
-
} else {
|
|
420
|
-
handleReturnToBottom();
|
|
421
|
-
}
|
|
422
|
-
};
|
|
423
|
-
$[47] = anchored;
|
|
424
|
-
$[48] = exitAnchoredMode;
|
|
425
|
-
$[49] = handleReturnToBottom;
|
|
426
|
-
$[50] = t20;
|
|
427
|
-
} else {
|
|
428
|
-
t20 = $[50];
|
|
429
|
-
}
|
|
430
|
-
const jumpToLatest = t20;
|
|
431
|
-
let t21;
|
|
432
|
-
if ($[51] === Symbol.for("react.memo_cache_sentinel")) {
|
|
433
|
-
t21 = event => {
|
|
434
|
-
const offsetY = event.nativeEvent.contentOffset.y;
|
|
435
|
-
setShowJumpToBottomButton(offsetY > 200);
|
|
436
|
-
};
|
|
437
|
-
$[51] = t21;
|
|
267
|
+
$[22] = restOffset;
|
|
268
|
+
$[23] = t11;
|
|
438
269
|
} else {
|
|
439
|
-
|
|
270
|
+
t11 = $[23];
|
|
440
271
|
}
|
|
441
|
-
const
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
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();
|
|
447
279
|
}
|
|
448
|
-
|
|
449
|
-
fetchPreviousPage();
|
|
280
|
+
handleReturnToBottom(false);
|
|
450
281
|
};
|
|
451
|
-
$[
|
|
452
|
-
$[
|
|
453
|
-
$[
|
|
454
|
-
$[
|
|
282
|
+
$[24] = behind;
|
|
283
|
+
$[25] = fetchLiveWindow;
|
|
284
|
+
$[26] = handleReturnToBottom;
|
|
285
|
+
$[27] = t12;
|
|
455
286
|
} else {
|
|
456
|
-
|
|
287
|
+
t12 = $[27];
|
|
457
288
|
}
|
|
458
|
-
const
|
|
459
|
-
let
|
|
460
|
-
if ($[
|
|
461
|
-
|
|
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 = () => {
|
|
462
293
|
if (reply_root_id) {
|
|
463
294
|
navigation.setParams({
|
|
464
295
|
title: replyHeaderTitle
|
|
@@ -472,86 +303,124 @@ function ConversationScreenContent(t0) {
|
|
|
472
303
|
});
|
|
473
304
|
}
|
|
474
305
|
};
|
|
475
|
-
$[
|
|
476
|
-
$[
|
|
477
|
-
$[
|
|
478
|
-
$[
|
|
479
|
-
$[
|
|
480
|
-
$[
|
|
481
|
-
$[
|
|
482
|
-
$[
|
|
483
|
-
} else {
|
|
484
|
-
|
|
485
|
-
}
|
|
486
|
-
const
|
|
487
|
-
let
|
|
488
|
-
if ($[
|
|
489
|
-
|
|
490
|
-
$[
|
|
491
|
-
$[
|
|
492
|
-
$[
|
|
493
|
-
$[
|
|
494
|
-
$[
|
|
495
|
-
$[
|
|
496
|
-
$[
|
|
497
|
-
$[
|
|
498
|
-
} else {
|
|
499
|
-
|
|
500
|
-
}
|
|
501
|
-
useEffect(
|
|
306
|
+
$[28] = badges?.[0];
|
|
307
|
+
$[29] = conversation.deleted;
|
|
308
|
+
$[30] = muted;
|
|
309
|
+
$[31] = navigation;
|
|
310
|
+
$[32] = replyHeaderTitle;
|
|
311
|
+
$[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;
|
|
366
|
+
} else {
|
|
367
|
+
t18 = $[50];
|
|
368
|
+
t19 = $[51];
|
|
369
|
+
}
|
|
370
|
+
useEffect(t18, t19);
|
|
502
371
|
if (!conversation || conversation.deleted) {
|
|
503
|
-
let
|
|
504
|
-
if ($[
|
|
505
|
-
|
|
372
|
+
let t20;
|
|
373
|
+
if ($[52] === Symbol.for("react.memo_cache_sentinel")) {
|
|
374
|
+
t20 = /*#__PURE__*/_jsx(BlankState.Imagery, {
|
|
506
375
|
name: "general.outlinedTextMessage"
|
|
507
376
|
});
|
|
508
|
-
$[
|
|
377
|
+
$[52] = t20;
|
|
509
378
|
} else {
|
|
510
|
-
|
|
379
|
+
t20 = $[52];
|
|
511
380
|
}
|
|
512
|
-
let
|
|
513
|
-
if ($[
|
|
514
|
-
|
|
381
|
+
let t21;
|
|
382
|
+
if ($[53] === Symbol.for("react.memo_cache_sentinel")) {
|
|
383
|
+
t21 = /*#__PURE__*/_jsx(BlankState.Content, {
|
|
515
384
|
children: /*#__PURE__*/_jsx(BlankState.Heading, {
|
|
516
385
|
children: "This conversation has been deleted"
|
|
517
386
|
})
|
|
518
387
|
});
|
|
519
|
-
$[
|
|
388
|
+
$[53] = t21;
|
|
520
389
|
} else {
|
|
521
|
-
|
|
390
|
+
t21 = $[53];
|
|
522
391
|
}
|
|
523
|
-
let
|
|
524
|
-
if ($[
|
|
525
|
-
|
|
526
|
-
children: [
|
|
392
|
+
let t22;
|
|
393
|
+
if ($[54] !== navigation.goBack) {
|
|
394
|
+
t22 = /*#__PURE__*/_jsxs(BlankState.Root, {
|
|
395
|
+
children: [t20, t21, /*#__PURE__*/_jsx(BlankState.Button, {
|
|
527
396
|
onPress: navigation.goBack,
|
|
528
397
|
title: "Back to conversations",
|
|
529
398
|
accessibilityHint: "Navigates back to the conversations list",
|
|
530
399
|
accessibilityRole: "link"
|
|
531
400
|
})]
|
|
532
401
|
});
|
|
533
|
-
$[
|
|
534
|
-
$[
|
|
402
|
+
$[54] = navigation.goBack;
|
|
403
|
+
$[55] = t22;
|
|
535
404
|
} else {
|
|
536
|
-
|
|
405
|
+
t22 = $[55];
|
|
537
406
|
}
|
|
538
|
-
let
|
|
539
|
-
if ($[
|
|
540
|
-
|
|
407
|
+
let t23;
|
|
408
|
+
if ($[56] !== styles.container || $[57] !== t22) {
|
|
409
|
+
t23 = /*#__PURE__*/_jsx(View, {
|
|
541
410
|
style: styles.container,
|
|
542
|
-
children:
|
|
411
|
+
children: t22
|
|
543
412
|
});
|
|
544
|
-
$[
|
|
545
|
-
$[
|
|
546
|
-
$[
|
|
413
|
+
$[56] = styles.container;
|
|
414
|
+
$[57] = t22;
|
|
415
|
+
$[58] = t23;
|
|
547
416
|
} else {
|
|
548
|
-
|
|
417
|
+
t23 = $[58];
|
|
549
418
|
}
|
|
550
|
-
return
|
|
419
|
+
return t23;
|
|
551
420
|
}
|
|
552
|
-
let
|
|
553
|
-
if ($[
|
|
554
|
-
|
|
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, {
|
|
555
424
|
style: styles.emptyState,
|
|
556
425
|
children: /*#__PURE__*/_jsx(ConversationStartBanner, {
|
|
557
426
|
conversation: conversation,
|
|
@@ -563,120 +432,127 @@ function ConversationScreenContent(t0) {
|
|
|
563
432
|
conversationId: conversation_id,
|
|
564
433
|
messages: messages,
|
|
565
434
|
replyRootId: reply_root_id,
|
|
566
|
-
anchorMessageId:
|
|
435
|
+
anchorMessageId: anchorMessageId,
|
|
436
|
+
behind: behind,
|
|
567
437
|
hasNextPage: hasNextPage,
|
|
568
438
|
onEndReached: () => fetchNextPage(),
|
|
439
|
+
onStartReached: () => fetchNewer().catch(logWindowFetchFailure),
|
|
569
440
|
onScroll: trackScroll,
|
|
570
441
|
onLayout: onLayout,
|
|
571
442
|
onContentSizeChange: onContentSizeChange,
|
|
572
443
|
onScrollEndDrag: onScrollEndDrag,
|
|
573
|
-
onMomentumScrollEnd: onMomentumScrollEnd
|
|
574
|
-
onScrollBeginDrag: anchored ? () => setHasDragged(true) : undefined,
|
|
575
|
-
onStartReached: anchored && hasDragged ? loadNewerMessages : undefined,
|
|
576
|
-
onStartReachedThreshold: anchored ? 0.5 : undefined,
|
|
577
|
-
maintainVisibleContentPosition: holdListPosition ? {
|
|
578
|
-
minIndexForVisible: 0
|
|
579
|
-
} : undefined
|
|
444
|
+
onMomentumScrollEnd: onMomentumScrollEnd
|
|
580
445
|
});
|
|
581
|
-
$[
|
|
582
|
-
$[
|
|
583
|
-
$[
|
|
584
|
-
$[
|
|
585
|
-
$[
|
|
586
|
-
$[
|
|
587
|
-
$[
|
|
588
|
-
$[
|
|
589
|
-
$[
|
|
590
|
-
$[
|
|
591
|
-
$[
|
|
592
|
-
$[
|
|
593
|
-
$[
|
|
594
|
-
$[
|
|
595
|
-
$[
|
|
596
|
-
$[
|
|
597
|
-
|
|
598
|
-
$[
|
|
599
|
-
}
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
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
|
|
608
481
|
});
|
|
609
|
-
$[
|
|
610
|
-
$[
|
|
611
|
-
$[
|
|
482
|
+
$[79] = t21;
|
|
483
|
+
$[80] = t22;
|
|
484
|
+
$[81] = t23;
|
|
612
485
|
} else {
|
|
613
|
-
|
|
486
|
+
t23 = $[81];
|
|
614
487
|
}
|
|
615
|
-
let
|
|
616
|
-
if ($[
|
|
617
|
-
|
|
618
|
-
$[
|
|
619
|
-
$[
|
|
488
|
+
let t24;
|
|
489
|
+
if ($[82] !== noMessages) {
|
|
490
|
+
t24 = !noMessages && /*#__PURE__*/_jsx(TypingIndicator, {});
|
|
491
|
+
$[82] = noMessages;
|
|
492
|
+
$[83] = t24;
|
|
620
493
|
} else {
|
|
621
|
-
|
|
494
|
+
t24 = $[83];
|
|
622
495
|
}
|
|
623
|
-
let
|
|
624
|
-
if ($[
|
|
625
|
-
|
|
626
|
-
$[
|
|
627
|
-
$[
|
|
496
|
+
let t25;
|
|
497
|
+
if ($[84] !== showLeaderDisabledReplyBanner) {
|
|
498
|
+
t25 = showLeaderDisabledReplyBanner && /*#__PURE__*/_jsx(LeaderMessagesDisabledBanner, {});
|
|
499
|
+
$[84] = showLeaderDisabledReplyBanner;
|
|
500
|
+
$[85] = t25;
|
|
628
501
|
} else {
|
|
629
|
-
|
|
502
|
+
t25 = $[85];
|
|
630
503
|
}
|
|
631
|
-
let
|
|
632
|
-
if ($[
|
|
633
|
-
|
|
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, {
|
|
634
507
|
conversation: conversation,
|
|
635
508
|
canReply: canReply,
|
|
636
509
|
replyRootAuthorFirstName: replyRootAuthorFirstName,
|
|
637
510
|
replyRootId: reply_root_id,
|
|
638
511
|
currentlyEditingMessage: currentlyEditingMessage,
|
|
639
512
|
onFlaggedInMessageForm: markHandledByMessageForm,
|
|
640
|
-
onBeforeSubmit:
|
|
513
|
+
onBeforeSubmit: returnToLatest
|
|
641
514
|
});
|
|
642
|
-
$[
|
|
643
|
-
$[
|
|
644
|
-
$[
|
|
645
|
-
$[
|
|
646
|
-
$[
|
|
647
|
-
$[
|
|
648
|
-
$[
|
|
649
|
-
$[
|
|
650
|
-
} else {
|
|
651
|
-
|
|
652
|
-
}
|
|
653
|
-
let
|
|
654
|
-
if ($[
|
|
655
|
-
|
|
656
|
-
children: [
|
|
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]
|
|
657
530
|
});
|
|
658
|
-
$[
|
|
659
|
-
$[
|
|
660
|
-
$[
|
|
661
|
-
$[
|
|
662
|
-
$[
|
|
663
|
-
$[
|
|
664
|
-
} else {
|
|
665
|
-
|
|
666
|
-
}
|
|
667
|
-
let
|
|
668
|
-
if ($[
|
|
669
|
-
|
|
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, {
|
|
670
543
|
style: styles.container,
|
|
671
|
-
children:
|
|
544
|
+
children: t27
|
|
672
545
|
});
|
|
673
|
-
$[
|
|
674
|
-
$[
|
|
675
|
-
$[
|
|
546
|
+
$[100] = styles.container;
|
|
547
|
+
$[101] = t27;
|
|
548
|
+
$[102] = t28;
|
|
676
549
|
} else {
|
|
677
|
-
|
|
550
|
+
t28 = $[102];
|
|
678
551
|
}
|
|
679
|
-
return
|
|
552
|
+
return t28;
|
|
553
|
+
}
|
|
554
|
+
function _temp(error) {
|
|
555
|
+
return Log.error("conversation window fetch failed", error);
|
|
680
556
|
}
|
|
681
557
|
function ConversationBottomBar(t0) {
|
|
682
558
|
const $ = _c(16);
|
|
@@ -760,7 +636,6 @@ function ConversationBottomBar(t0) {
|
|
|
760
636
|
}
|
|
761
637
|
return t6;
|
|
762
638
|
}
|
|
763
|
-
const isBeforeLatestMessage = (anchor, latestMessageCreatedAt) => !!anchor && !!latestMessageCreatedAt && decodeUlidTime(anchor) < Date.parse(latestMessageCreatedAt);
|
|
764
639
|
export const ConversationScreenTitle = t0 => {
|
|
765
640
|
const $ = _c(29);
|
|
766
641
|
const {
|
|
@@ -980,7 +855,7 @@ const useEnsureConversationsRouteExists = () => {
|
|
|
980
855
|
t0 = () => {
|
|
981
856
|
const navigationState = navigation.getState();
|
|
982
857
|
const routes = navigationState?.routes || [];
|
|
983
|
-
const conversationsRoute = routes.find(
|
|
858
|
+
const conversationsRoute = routes.find(_temp2);
|
|
984
859
|
if (conversationsRoute) {
|
|
985
860
|
return;
|
|
986
861
|
}
|
|
@@ -1013,7 +888,7 @@ const useEnsureConversationsRouteExists = () => {
|
|
|
1013
888
|
}
|
|
1014
889
|
useEffect(t0, t2);
|
|
1015
890
|
};
|
|
1016
|
-
function
|
|
891
|
+
function _temp2(r) {
|
|
1017
892
|
return r.name === "Conversations";
|
|
1018
893
|
}
|
|
1019
894
|
//# sourceMappingURL=conversation_screen.js.map
|