@planningcenter/chat-react-native 4.2.1-qa-staging.5 → 4.2.1-rc.0
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 +51 -54
- package/build/components/conversation/message_form.js.map +1 -1
- package/build/components/conversation/message_list.d.ts +2 -3
- package/build/components/conversation/message_list.d.ts.map +1 -1
- package/build/components/conversation/message_list.js +66 -152
- package/build/components/conversation/message_list.js.map +1 -1
- 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/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/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 +2 -9
- package/build/hooks/use_conversation_messages.d.ts.map +1 -1
- package/build/hooks/use_conversation_messages.js +45 -84
- 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 +80 -89
- package/build/hooks/use_conversation_messages_jolt_events.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_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_suspense_api.d.ts.map +1 -1
- package/build/hooks/use_suspense_api.js +8 -5
- 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 +254 -481
- 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/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 -2
- 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 +0 -3
- package/build/utils/cache/messages_cache.js.map +1 -1
- 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/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/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/components/conversation/__tests__/message_list.test.tsx +0 -42
- package/src/components/conversation/message_form.tsx +0 -3
- package/src/components/conversation/message_list.tsx +4 -58
- package/src/contexts/api_provider.tsx +1 -2
- package/src/contexts/conversation_context.tsx +1 -6
- package/src/hooks/index.ts +0 -1
- package/src/hooks/paginator_meta.ts +5 -29
- package/src/hooks/use_api.ts +5 -4
- package/src/hooks/use_conversation_messages.ts +11 -52
- package/src/hooks/use_conversation_messages_jolt_events.ts +43 -62
- package/src/hooks/use_mark_latest_message_read.ts +3 -4
- 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 +5 -4
- package/src/screens/conversation_new/components/services_form.tsx +5 -5
- package/src/screens/conversation_screen.tsx +14 -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 -2
- package/src/types/resources/member.ts +0 -1
- package/src/utils/cache/__tests__/messages_cache.test.ts +1 -14
- package/src/utils/cache/messages_cache.ts +0 -3
- package/src/utils/cache/optimistically_update_message.ts +5 -2
- package/src/utils/client/types.ts +0 -1
- 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_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/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__/hooks/use_direct_message_eligibility.test.tsx +0 -83
- package/src/__tests__/screens/conversation_new/components/services_form.test.tsx +0 -91
- 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_direct_message_eligibility.ts +0 -40
- 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';
|
|
@@ -21,27 +20,19 @@ import { useConversation } from '../hooks/use_conversation';
|
|
|
21
20
|
import { useConversationJoltEvents } from '../hooks/use_conversation_jolt_events';
|
|
22
21
|
import { 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 { newestPersistedMessageId } from '../utils/cache/messages_cache';
|
|
32
|
-
import { gatedMessageCache } from '../utils/gated_message_cache';
|
|
33
|
-
import { getMessagesQueryKey } from '../utils/request/get_messages';
|
|
34
|
-
import { decodeUlidTime } from '../utils/ulid';
|
|
35
27
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
36
28
|
export function ConversationScreen(t0) {
|
|
37
|
-
const $ = _c(
|
|
29
|
+
const $ = _c(13);
|
|
38
30
|
const {
|
|
39
31
|
route
|
|
40
32
|
} = t0;
|
|
41
33
|
const {
|
|
42
34
|
conversation_id,
|
|
43
|
-
reply_root_id
|
|
44
|
-
initial_message_id
|
|
35
|
+
reply_root_id
|
|
45
36
|
} = route.params;
|
|
46
37
|
let t1;
|
|
47
38
|
if ($[0] !== conversation_id) {
|
|
@@ -57,111 +48,57 @@ export function ConversationScreen(t0) {
|
|
|
57
48
|
data: conversation
|
|
58
49
|
} = useConversation(t1);
|
|
59
50
|
let t2;
|
|
60
|
-
if ($[2] !== conversation
|
|
61
|
-
t2 = (
|
|
62
|
-
$[2] = conversation
|
|
63
|
-
$[3] =
|
|
64
|
-
$[4] = t2;
|
|
51
|
+
if ($[2] !== conversation) {
|
|
52
|
+
t2 = normalizeAnalyticsMetadata(conversation);
|
|
53
|
+
$[2] = conversation;
|
|
54
|
+
$[3] = t2;
|
|
65
55
|
} else {
|
|
66
|
-
t2 = $[
|
|
56
|
+
t2 = $[3];
|
|
67
57
|
}
|
|
68
|
-
const [anchor, setAnchor] = useState(t2);
|
|
69
58
|
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;
|
|
59
|
+
if ($[4] !== reply_root_id || $[5] !== t2) {
|
|
60
|
+
t3 = {
|
|
61
|
+
reply_root_id,
|
|
62
|
+
...t2
|
|
63
|
+
};
|
|
64
|
+
$[4] = reply_root_id;
|
|
65
|
+
$[5] = t2;
|
|
66
|
+
$[6] = t3;
|
|
81
67
|
} else {
|
|
82
|
-
|
|
68
|
+
t3 = $[6];
|
|
83
69
|
}
|
|
84
|
-
|
|
70
|
+
usePublishProductAnalyticsEvent(analyticsEvents.conversation_show_opened, t3);
|
|
71
|
+
const t4 = reply_root_id ?? null;
|
|
85
72
|
let t5;
|
|
86
|
-
if ($[7] !==
|
|
87
|
-
t5 =
|
|
88
|
-
|
|
73
|
+
if ($[7] !== route) {
|
|
74
|
+
t5 = /*#__PURE__*/_jsx(ConversationScreenContent, {
|
|
75
|
+
route: route
|
|
76
|
+
});
|
|
77
|
+
$[7] = route;
|
|
89
78
|
$[8] = t5;
|
|
90
79
|
} else {
|
|
91
80
|
t5 = $[8];
|
|
92
81
|
}
|
|
93
82
|
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, {
|
|
83
|
+
if ($[9] !== conversation_id || $[10] !== t4 || $[11] !== t5) {
|
|
84
|
+
t6 = /*#__PURE__*/_jsx(ConversationContextProvider, {
|
|
144
85
|
conversationId: conversation_id,
|
|
145
|
-
currentPageReplyRootId:
|
|
146
|
-
|
|
147
|
-
children: t9
|
|
86
|
+
currentPageReplyRootId: t4,
|
|
87
|
+
children: t5
|
|
148
88
|
});
|
|
149
|
-
$[
|
|
150
|
-
$[
|
|
151
|
-
$[
|
|
152
|
-
$[
|
|
153
|
-
$[23] = t10;
|
|
89
|
+
$[9] = conversation_id;
|
|
90
|
+
$[10] = t4;
|
|
91
|
+
$[11] = t5;
|
|
92
|
+
$[12] = t6;
|
|
154
93
|
} else {
|
|
155
|
-
|
|
94
|
+
t6 = $[12];
|
|
156
95
|
}
|
|
157
|
-
return
|
|
96
|
+
return t6;
|
|
158
97
|
}
|
|
159
98
|
function ConversationScreenContent(t0) {
|
|
160
|
-
const $ = _c(
|
|
99
|
+
const $ = _c(80);
|
|
161
100
|
const {
|
|
162
|
-
route
|
|
163
|
-
anchor,
|
|
164
|
-
onExitAnchoredMode
|
|
101
|
+
route
|
|
165
102
|
} = t0;
|
|
166
103
|
const styles = useStyles();
|
|
167
104
|
const navigation = useNavigation();
|
|
@@ -174,158 +111,62 @@ function ConversationScreenContent(t0) {
|
|
|
174
111
|
const {
|
|
175
112
|
data: conversation
|
|
176
113
|
} = useConversation(route.params);
|
|
177
|
-
const anchored = !!anchor;
|
|
178
114
|
let t1;
|
|
179
|
-
if ($[0] !==
|
|
115
|
+
if ($[0] !== conversation_id || $[1] !== reply_root_id) {
|
|
180
116
|
t1 = {
|
|
181
117
|
conversation_id,
|
|
182
|
-
reply_root_id
|
|
183
|
-
anchor
|
|
118
|
+
reply_root_id
|
|
184
119
|
};
|
|
185
|
-
$[0] =
|
|
186
|
-
$[1] =
|
|
187
|
-
$[2] =
|
|
188
|
-
$[3] = t1;
|
|
120
|
+
$[0] = conversation_id;
|
|
121
|
+
$[1] = reply_root_id;
|
|
122
|
+
$[2] = t1;
|
|
189
123
|
} else {
|
|
190
|
-
t1 = $[
|
|
124
|
+
t1 = $[2];
|
|
191
125
|
}
|
|
192
126
|
const {
|
|
193
127
|
messages,
|
|
194
128
|
fetchNextPage,
|
|
195
|
-
hasNextPage
|
|
196
|
-
fetchPreviousPage,
|
|
197
|
-
hasPreviousPage,
|
|
198
|
-
isFetchingPreviousPage,
|
|
199
|
-
queryKey
|
|
129
|
+
hasNextPage
|
|
200
130
|
} = useConversationMessages(t1);
|
|
201
|
-
const behindLatest = anchored && hasPreviousPage;
|
|
202
|
-
const caughtUp = !hasPreviousPage;
|
|
203
|
-
const [showJumpToBottomButton, setShowJumpToBottomButton] = useState(false);
|
|
204
|
-
const readingHistory = showJumpToBottomButton;
|
|
205
131
|
let t2;
|
|
206
|
-
if ($[
|
|
207
|
-
t2 =
|
|
208
|
-
$[4] = messages;
|
|
209
|
-
$[5] = t2;
|
|
210
|
-
} else {
|
|
211
|
-
t2 = $[5];
|
|
212
|
-
}
|
|
213
|
-
const newestMessageId = t2;
|
|
214
|
-
const t3 = anchored ? onExitAnchoredMode : undefined;
|
|
215
|
-
let t4;
|
|
216
|
-
if ($[6] !== conversation_id || $[7] !== queryKey || $[8] !== reply_root_id || $[9] !== t3) {
|
|
217
|
-
t4 = {
|
|
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 = {
|
|
132
|
+
if ($[3] !== conversation_id) {
|
|
133
|
+
t2 = {
|
|
254
134
|
conversationId: conversation_id
|
|
255
135
|
};
|
|
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;
|
|
136
|
+
$[3] = conversation_id;
|
|
137
|
+
$[4] = t2;
|
|
275
138
|
} else {
|
|
276
|
-
|
|
139
|
+
t2 = $[4];
|
|
277
140
|
}
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
messageCache: t9
|
|
141
|
+
useConversationJoltEvents(t2);
|
|
142
|
+
let t3;
|
|
143
|
+
if ($[5] !== conversation_id) {
|
|
144
|
+
t3 = {
|
|
145
|
+
conversationId: conversation_id
|
|
284
146
|
};
|
|
285
|
-
$[
|
|
286
|
-
$[
|
|
287
|
-
$[24] = t9;
|
|
288
|
-
$[25] = t10;
|
|
147
|
+
$[5] = conversation_id;
|
|
148
|
+
$[6] = t3;
|
|
289
149
|
} else {
|
|
290
|
-
|
|
150
|
+
t3 = $[6];
|
|
291
151
|
}
|
|
292
|
-
useConversationMessagesJoltEvents(
|
|
152
|
+
useConversationMessagesJoltEvents(t3);
|
|
293
153
|
const {
|
|
294
154
|
markHandledByMessageForm
|
|
295
155
|
} = useVideoModerationJoltEvents();
|
|
296
156
|
useEnsureConversationsRouteExists();
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
t12 = {
|
|
157
|
+
let t4;
|
|
158
|
+
if ($[7] !== conversation || $[8] !== messages) {
|
|
159
|
+
t4 = {
|
|
301
160
|
conversation,
|
|
302
|
-
messages
|
|
303
|
-
enabled: t11
|
|
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
|
|
161
|
+
messages
|
|
320
162
|
};
|
|
321
|
-
$[
|
|
322
|
-
$[
|
|
323
|
-
$[
|
|
324
|
-
$[33] = t14;
|
|
163
|
+
$[7] = conversation;
|
|
164
|
+
$[8] = messages;
|
|
165
|
+
$[9] = t4;
|
|
325
166
|
} else {
|
|
326
|
-
|
|
167
|
+
t4 = $[9];
|
|
327
168
|
}
|
|
328
|
-
|
|
169
|
+
useMarkLatestMessageRead(t4);
|
|
329
170
|
const noMessages = messages.length === 0;
|
|
330
171
|
const {
|
|
331
172
|
repliesDisabled,
|
|
@@ -335,47 +176,57 @@ function ConversationScreenContent(t0) {
|
|
|
335
176
|
} = conversation;
|
|
336
177
|
const canReply = memberAbility?.canReply;
|
|
337
178
|
const showLeaderDisabledReplyBanner = canReply && repliesDisabled;
|
|
338
|
-
let
|
|
339
|
-
if ($[
|
|
340
|
-
let
|
|
341
|
-
if ($[
|
|
342
|
-
|
|
343
|
-
$[
|
|
344
|
-
$[
|
|
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;
|
|
345
186
|
} else {
|
|
346
|
-
|
|
187
|
+
t6 = $[14];
|
|
347
188
|
}
|
|
348
|
-
|
|
349
|
-
$[
|
|
350
|
-
$[
|
|
351
|
-
$[
|
|
189
|
+
t5 = messages.find(t6);
|
|
190
|
+
$[10] = editing_message_id;
|
|
191
|
+
$[11] = messages;
|
|
192
|
+
$[12] = t5;
|
|
352
193
|
} else {
|
|
353
|
-
|
|
194
|
+
t5 = $[12];
|
|
354
195
|
}
|
|
355
|
-
const currentlyEditingMessage =
|
|
356
|
-
let
|
|
357
|
-
if ($[
|
|
358
|
-
|
|
359
|
-
$[
|
|
360
|
-
$[
|
|
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;
|
|
361
202
|
} else {
|
|
362
|
-
|
|
203
|
+
t6 = $[16];
|
|
363
204
|
}
|
|
364
|
-
const replyRootAuthorFirstName =
|
|
205
|
+
const replyRootAuthorFirstName = t6;
|
|
365
206
|
const replyHeaderTitle = replyRootAuthorFirstName ? `Reply to ${replyRootAuthorFirstName}` : "Reply";
|
|
366
207
|
const muted = conversation.conversationMembership?.muted ?? conversation.muted;
|
|
367
208
|
const listRef = useRef(null);
|
|
368
|
-
const [
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
209
|
+
const [showJumpToBottomButton, setShowJumpToBottomButton] = useState(false);
|
|
210
|
+
let t7;
|
|
211
|
+
if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
|
|
212
|
+
t7 = event => {
|
|
213
|
+
const offsetY = event.nativeEvent.contentOffset.y;
|
|
214
|
+
setShowJumpToBottomButton(offsetY > 200);
|
|
215
|
+
};
|
|
216
|
+
$[17] = t7;
|
|
217
|
+
} else {
|
|
218
|
+
t7 = $[17];
|
|
219
|
+
}
|
|
220
|
+
const trackScroll = t7;
|
|
221
|
+
let t8;
|
|
222
|
+
if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
|
|
223
|
+
t8 = {
|
|
373
224
|
listRef,
|
|
374
225
|
enabled: Platform.OS === "ios"
|
|
375
226
|
};
|
|
376
|
-
$[
|
|
227
|
+
$[18] = t8;
|
|
377
228
|
} else {
|
|
378
|
-
|
|
229
|
+
t8 = $[18];
|
|
379
230
|
}
|
|
380
231
|
const {
|
|
381
232
|
restOffset,
|
|
@@ -383,82 +234,23 @@ function ConversationScreenContent(t0) {
|
|
|
383
234
|
onContentSizeChange,
|
|
384
235
|
onMomentumScrollEnd,
|
|
385
236
|
onScrollEndDrag
|
|
386
|
-
} = useRestAwayFromDismissEdge(
|
|
387
|
-
let
|
|
388
|
-
if ($[
|
|
389
|
-
|
|
237
|
+
} = useRestAwayFromDismissEdge(t8);
|
|
238
|
+
let t9;
|
|
239
|
+
if ($[19] !== restOffset) {
|
|
240
|
+
t9 = () => {
|
|
390
241
|
listRef.current?.scrollToOffset({
|
|
391
242
|
offset: restOffset
|
|
392
243
|
});
|
|
393
244
|
};
|
|
394
|
-
$[
|
|
395
|
-
$[
|
|
245
|
+
$[19] = restOffset;
|
|
246
|
+
$[20] = t9;
|
|
396
247
|
} else {
|
|
397
|
-
|
|
248
|
+
t9 = $[20];
|
|
398
249
|
}
|
|
399
|
-
const handleReturnToBottom =
|
|
400
|
-
let
|
|
401
|
-
if ($[
|
|
402
|
-
|
|
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;
|
|
438
|
-
} else {
|
|
439
|
-
t21 = $[51];
|
|
440
|
-
}
|
|
441
|
-
const trackScroll = t21;
|
|
442
|
-
let t22;
|
|
443
|
-
if ($[52] !== fetchPreviousPage || $[53] !== hasPreviousPage || $[54] !== isFetchingPreviousPage) {
|
|
444
|
-
t22 = () => {
|
|
445
|
-
if (!hasPreviousPage || isFetchingPreviousPage) {
|
|
446
|
-
return;
|
|
447
|
-
}
|
|
448
|
-
setHasDragged(false);
|
|
449
|
-
fetchPreviousPage();
|
|
450
|
-
};
|
|
451
|
-
$[52] = fetchPreviousPage;
|
|
452
|
-
$[53] = hasPreviousPage;
|
|
453
|
-
$[54] = isFetchingPreviousPage;
|
|
454
|
-
$[55] = t22;
|
|
455
|
-
} else {
|
|
456
|
-
t22 = $[55];
|
|
457
|
-
}
|
|
458
|
-
const loadNewerMessages = t22;
|
|
459
|
-
let t23;
|
|
460
|
-
if ($[56] !== badges?.[0] || $[57] !== conversation.deleted || $[58] !== muted || $[59] !== navigation || $[60] !== replyHeaderTitle || $[61] !== reply_root_id || $[62] !== title) {
|
|
461
|
-
t23 = () => {
|
|
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 = () => {
|
|
462
254
|
if (reply_root_id) {
|
|
463
255
|
navigation.setParams({
|
|
464
256
|
title: replyHeaderTitle
|
|
@@ -472,86 +264,86 @@ function ConversationScreenContent(t0) {
|
|
|
472
264
|
});
|
|
473
265
|
}
|
|
474
266
|
};
|
|
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(
|
|
267
|
+
$[21] = badges?.[0];
|
|
268
|
+
$[22] = conversation.deleted;
|
|
269
|
+
$[23] = muted;
|
|
270
|
+
$[24] = navigation;
|
|
271
|
+
$[25] = replyHeaderTitle;
|
|
272
|
+
$[26] = reply_root_id;
|
|
273
|
+
$[27] = title;
|
|
274
|
+
$[28] = t10;
|
|
275
|
+
} else {
|
|
276
|
+
t10 = $[28];
|
|
277
|
+
}
|
|
278
|
+
const t11 = conversation?.deleted;
|
|
279
|
+
let t12;
|
|
280
|
+
if ($[29] !== badges || $[30] !== muted || $[31] !== navigation || $[32] !== replyHeaderTitle || $[33] !== reply_root_id || $[34] !== t11 || $[35] !== title) {
|
|
281
|
+
t12 = [navigation, title, badges, t11, reply_root_id, replyHeaderTitle, muted];
|
|
282
|
+
$[29] = badges;
|
|
283
|
+
$[30] = muted;
|
|
284
|
+
$[31] = navigation;
|
|
285
|
+
$[32] = replyHeaderTitle;
|
|
286
|
+
$[33] = reply_root_id;
|
|
287
|
+
$[34] = t11;
|
|
288
|
+
$[35] = title;
|
|
289
|
+
$[36] = t12;
|
|
290
|
+
} else {
|
|
291
|
+
t12 = $[36];
|
|
292
|
+
}
|
|
293
|
+
useEffect(t10, t12);
|
|
502
294
|
if (!conversation || conversation.deleted) {
|
|
503
|
-
let
|
|
504
|
-
if ($[
|
|
505
|
-
|
|
295
|
+
let t13;
|
|
296
|
+
if ($[37] === Symbol.for("react.memo_cache_sentinel")) {
|
|
297
|
+
t13 = /*#__PURE__*/_jsx(BlankState.Imagery, {
|
|
506
298
|
name: "general.outlinedTextMessage"
|
|
507
299
|
});
|
|
508
|
-
$[
|
|
300
|
+
$[37] = t13;
|
|
509
301
|
} else {
|
|
510
|
-
|
|
302
|
+
t13 = $[37];
|
|
511
303
|
}
|
|
512
|
-
let
|
|
513
|
-
if ($[
|
|
514
|
-
|
|
304
|
+
let t14;
|
|
305
|
+
if ($[38] === Symbol.for("react.memo_cache_sentinel")) {
|
|
306
|
+
t14 = /*#__PURE__*/_jsx(BlankState.Content, {
|
|
515
307
|
children: /*#__PURE__*/_jsx(BlankState.Heading, {
|
|
516
308
|
children: "This conversation has been deleted"
|
|
517
309
|
})
|
|
518
310
|
});
|
|
519
|
-
$[
|
|
311
|
+
$[38] = t14;
|
|
520
312
|
} else {
|
|
521
|
-
|
|
313
|
+
t14 = $[38];
|
|
522
314
|
}
|
|
523
|
-
let
|
|
524
|
-
if ($[
|
|
525
|
-
|
|
526
|
-
children: [
|
|
315
|
+
let t15;
|
|
316
|
+
if ($[39] !== navigation.goBack) {
|
|
317
|
+
t15 = /*#__PURE__*/_jsxs(BlankState.Root, {
|
|
318
|
+
children: [t13, t14, /*#__PURE__*/_jsx(BlankState.Button, {
|
|
527
319
|
onPress: navigation.goBack,
|
|
528
320
|
title: "Back to conversations",
|
|
529
321
|
accessibilityHint: "Navigates back to the conversations list",
|
|
530
322
|
accessibilityRole: "link"
|
|
531
323
|
})]
|
|
532
324
|
});
|
|
533
|
-
$[
|
|
534
|
-
$[
|
|
325
|
+
$[39] = navigation.goBack;
|
|
326
|
+
$[40] = t15;
|
|
535
327
|
} else {
|
|
536
|
-
|
|
328
|
+
t15 = $[40];
|
|
537
329
|
}
|
|
538
|
-
let
|
|
539
|
-
if ($[
|
|
540
|
-
|
|
330
|
+
let t16;
|
|
331
|
+
if ($[41] !== styles.container || $[42] !== t15) {
|
|
332
|
+
t16 = /*#__PURE__*/_jsx(View, {
|
|
541
333
|
style: styles.container,
|
|
542
|
-
children:
|
|
334
|
+
children: t15
|
|
543
335
|
});
|
|
544
|
-
$[
|
|
545
|
-
$[
|
|
546
|
-
$[
|
|
336
|
+
$[41] = styles.container;
|
|
337
|
+
$[42] = t15;
|
|
338
|
+
$[43] = t16;
|
|
547
339
|
} else {
|
|
548
|
-
|
|
340
|
+
t16 = $[43];
|
|
549
341
|
}
|
|
550
|
-
return
|
|
342
|
+
return t16;
|
|
551
343
|
}
|
|
552
|
-
let
|
|
553
|
-
if ($[
|
|
554
|
-
|
|
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, {
|
|
555
347
|
style: styles.emptyState,
|
|
556
348
|
children: /*#__PURE__*/_jsx(ConversationStartBanner, {
|
|
557
349
|
conversation: conversation,
|
|
@@ -563,131 +355,115 @@ function ConversationScreenContent(t0) {
|
|
|
563
355
|
conversationId: conversation_id,
|
|
564
356
|
messages: messages,
|
|
565
357
|
replyRootId: reply_root_id,
|
|
566
|
-
anchorMessageId: anchor,
|
|
567
358
|
hasNextPage: hasNextPage,
|
|
568
359
|
onEndReached: () => fetchNextPage(),
|
|
569
360
|
onScroll: trackScroll,
|
|
570
361
|
onLayout: onLayout,
|
|
571
362
|
onContentSizeChange: onContentSizeChange,
|
|
572
363
|
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
|
|
364
|
+
onMomentumScrollEnd: onMomentumScrollEnd
|
|
580
365
|
});
|
|
581
|
-
$[
|
|
582
|
-
$[
|
|
583
|
-
$[
|
|
584
|
-
$[
|
|
585
|
-
$[
|
|
586
|
-
$[
|
|
587
|
-
$[
|
|
588
|
-
$[
|
|
589
|
-
$[
|
|
590
|
-
$[
|
|
591
|
-
$[
|
|
592
|
-
$[
|
|
593
|
-
$[
|
|
594
|
-
|
|
595
|
-
$[
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
const t27 = behindLatest || showJumpToBottomButton;
|
|
603
|
-
let t28;
|
|
604
|
-
if ($[97] !== jumpToLatest || $[98] !== t27) {
|
|
605
|
-
t28 = /*#__PURE__*/_jsx(JumpToBottomButton, {
|
|
606
|
-
onPress: jumpToLatest,
|
|
607
|
-
visible: t27
|
|
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
|
|
608
387
|
});
|
|
609
|
-
$[
|
|
610
|
-
$[
|
|
611
|
-
$[
|
|
388
|
+
$[57] = handleReturnToBottom;
|
|
389
|
+
$[58] = showJumpToBottomButton;
|
|
390
|
+
$[59] = t14;
|
|
612
391
|
} else {
|
|
613
|
-
|
|
392
|
+
t14 = $[59];
|
|
614
393
|
}
|
|
615
|
-
let
|
|
616
|
-
if ($[
|
|
617
|
-
|
|
618
|
-
$[
|
|
619
|
-
$[
|
|
394
|
+
let t15;
|
|
395
|
+
if ($[60] !== noMessages) {
|
|
396
|
+
t15 = !noMessages && /*#__PURE__*/_jsx(TypingIndicator, {});
|
|
397
|
+
$[60] = noMessages;
|
|
398
|
+
$[61] = t15;
|
|
620
399
|
} else {
|
|
621
|
-
|
|
400
|
+
t15 = $[61];
|
|
622
401
|
}
|
|
623
|
-
let
|
|
624
|
-
if ($[
|
|
625
|
-
|
|
626
|
-
$[
|
|
627
|
-
$[
|
|
402
|
+
let t16;
|
|
403
|
+
if ($[62] !== showLeaderDisabledReplyBanner) {
|
|
404
|
+
t16 = showLeaderDisabledReplyBanner && /*#__PURE__*/_jsx(LeaderMessagesDisabledBanner, {});
|
|
405
|
+
$[62] = showLeaderDisabledReplyBanner;
|
|
406
|
+
$[63] = t16;
|
|
628
407
|
} else {
|
|
629
|
-
|
|
408
|
+
t16 = $[63];
|
|
630
409
|
}
|
|
631
|
-
let
|
|
632
|
-
if ($[
|
|
633
|
-
|
|
410
|
+
let t17;
|
|
411
|
+
if ($[64] !== canReply || $[65] !== conversation || $[66] !== currentlyEditingMessage || $[67] !== markHandledByMessageForm || $[68] !== replyRootAuthorFirstName || $[69] !== reply_root_id) {
|
|
412
|
+
t17 = /*#__PURE__*/_jsx(ConversationBottomBar, {
|
|
634
413
|
conversation: conversation,
|
|
635
414
|
canReply: canReply,
|
|
636
415
|
replyRootAuthorFirstName: replyRootAuthorFirstName,
|
|
637
416
|
replyRootId: reply_root_id,
|
|
638
417
|
currentlyEditingMessage: currentlyEditingMessage,
|
|
639
|
-
onFlaggedInMessageForm: markHandledByMessageForm
|
|
640
|
-
onBeforeSubmit: jumpToLatest
|
|
418
|
+
onFlaggedInMessageForm: markHandledByMessageForm
|
|
641
419
|
});
|
|
642
|
-
$[
|
|
643
|
-
$[
|
|
644
|
-
$[
|
|
645
|
-
$[
|
|
646
|
-
$[
|
|
647
|
-
$[
|
|
648
|
-
$[
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
children: [t26, t28, t29, t30, t31]
|
|
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]
|
|
657
434
|
});
|
|
658
|
-
$[
|
|
659
|
-
$[
|
|
660
|
-
$[
|
|
661
|
-
$[
|
|
662
|
-
$[
|
|
663
|
-
$[
|
|
664
|
-
} else {
|
|
665
|
-
|
|
666
|
-
}
|
|
667
|
-
let
|
|
668
|
-
if ($[
|
|
669
|
-
|
|
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, {
|
|
670
447
|
style: styles.container,
|
|
671
|
-
children:
|
|
448
|
+
children: t18
|
|
672
449
|
});
|
|
673
|
-
$[
|
|
674
|
-
$[
|
|
675
|
-
$[
|
|
450
|
+
$[77] = styles.container;
|
|
451
|
+
$[78] = t18;
|
|
452
|
+
$[79] = t19;
|
|
676
453
|
} else {
|
|
677
|
-
|
|
454
|
+
t19 = $[79];
|
|
678
455
|
}
|
|
679
|
-
return
|
|
456
|
+
return t19;
|
|
680
457
|
}
|
|
681
458
|
function ConversationBottomBar(t0) {
|
|
682
|
-
const $ = _c(
|
|
459
|
+
const $ = _c(15);
|
|
683
460
|
const {
|
|
684
461
|
conversation,
|
|
685
462
|
canReply,
|
|
686
463
|
replyRootAuthorFirstName,
|
|
687
464
|
replyRootId,
|
|
688
465
|
currentlyEditingMessage,
|
|
689
|
-
onFlaggedInMessageForm
|
|
690
|
-
onBeforeSubmit
|
|
466
|
+
onFlaggedInMessageForm
|
|
691
467
|
} = t0;
|
|
692
468
|
const messageLink = useMessageAvailableMembersAction(conversation);
|
|
693
469
|
if (conversation.disabled) {
|
|
@@ -737,30 +513,27 @@ function ConversationBottomBar(t0) {
|
|
|
737
513
|
t5 = $[7];
|
|
738
514
|
}
|
|
739
515
|
let t6;
|
|
740
|
-
if ($[8] !== conversation || $[9] !== currentlyEditingMessage || $[10] !==
|
|
516
|
+
if ($[8] !== conversation || $[9] !== currentlyEditingMessage || $[10] !== onFlaggedInMessageForm || $[11] !== replyRootAuthorFirstName || $[12] !== replyRootId || $[13] !== t1) {
|
|
741
517
|
t6 = /*#__PURE__*/_jsxs(MessageForm.Root, {
|
|
742
518
|
replyRootAuthorFirstName: replyRootAuthorFirstName,
|
|
743
519
|
conversation: conversation,
|
|
744
520
|
replyRootId: replyRootId,
|
|
745
521
|
currentlyEditingMessage: currentlyEditingMessage,
|
|
746
522
|
onFlaggedInMessageForm: onFlaggedInMessageForm,
|
|
747
|
-
onBeforeSubmit: onBeforeSubmit,
|
|
748
523
|
children: [t2, t3, t4, t5]
|
|
749
524
|
}, t1);
|
|
750
525
|
$[8] = conversation;
|
|
751
526
|
$[9] = currentlyEditingMessage;
|
|
752
|
-
$[10] =
|
|
753
|
-
$[11] =
|
|
754
|
-
$[12] =
|
|
755
|
-
$[13] =
|
|
756
|
-
$[14] =
|
|
757
|
-
$[15] = t6;
|
|
527
|
+
$[10] = onFlaggedInMessageForm;
|
|
528
|
+
$[11] = replyRootAuthorFirstName;
|
|
529
|
+
$[12] = replyRootId;
|
|
530
|
+
$[13] = t1;
|
|
531
|
+
$[14] = t6;
|
|
758
532
|
} else {
|
|
759
|
-
t6 = $[
|
|
533
|
+
t6 = $[14];
|
|
760
534
|
}
|
|
761
535
|
return t6;
|
|
762
536
|
}
|
|
763
|
-
const isBeforeLatestMessage = (anchor, latestMessageCreatedAt) => !!anchor && !!latestMessageCreatedAt && decodeUlidTime(anchor) < Date.parse(latestMessageCreatedAt);
|
|
764
537
|
export const ConversationScreenTitle = t0 => {
|
|
765
538
|
const $ = _c(29);
|
|
766
539
|
const {
|