@planningcenter/chat-react-native 4.7.1-qa-staging.0 → 4.7.1-qa-1092.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/conversations/conversation_actions.d.ts.map +1 -1
- package/build/components/conversations/conversation_actions.js +186 -322
- package/build/components/conversations/conversation_actions.js.map +1 -1
- package/build/components/group_conversation_list.d.ts.map +1 -1
- package/build/components/group_conversation_list.js +0 -1
- package/build/components/group_conversation_list.js.map +1 -1
- package/build/contexts/conversations_context.d.ts +1 -3
- package/build/contexts/conversations_context.d.ts.map +1 -1
- package/build/contexts/conversations_context.js +27 -32
- package/build/contexts/conversations_context.js.map +1 -1
- package/build/hooks/use_conversation.d.ts.map +1 -1
- package/build/hooks/use_conversation.js +1 -1
- package/build/hooks/use_conversation.js.map +1 -1
- package/build/hooks/use_features.d.ts +0 -1
- 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/navigation/index.d.ts +0 -5
- package/build/navigation/index.d.ts.map +1 -1
- package/build/navigation/index.js +0 -5
- package/build/navigation/index.js.map +1 -1
- package/build/screens/conversation_details_screen.d.ts.map +1 -1
- package/build/screens/conversation_details_screen.js +394 -460
- package/build/screens/conversation_details_screen.js.map +1 -1
- package/build/screens/conversations/conversations_screen.d.ts.map +1 -1
- package/build/screens/conversations/conversations_screen.js +10 -18
- package/build/screens/conversations/conversations_screen.js.map +1 -1
- package/build/screens/index.d.ts +0 -1
- package/build/screens/index.d.ts.map +1 -1
- package/build/screens/index.js +0 -1
- package/build/screens/index.js.map +1 -1
- package/build/types/resources/conversation_membership.d.ts +0 -1
- package/build/types/resources/conversation_membership.d.ts.map +1 -1
- package/build/types/resources/conversation_membership.js.map +1 -1
- package/package.json +3 -3
- package/src/components/conversations/__tests__/conversation_actions.test.tsx +2 -76
- package/src/components/conversations/conversation_actions.tsx +4 -68
- package/src/components/group_conversation_list.tsx +1 -4
- package/src/contexts/conversations_context.tsx +1 -6
- package/src/hooks/use_conversation.ts +0 -1
- package/src/hooks/use_features.ts +0 -1
- package/src/navigation/index.tsx +0 -8
- package/src/screens/__tests__/conversation_details_screen.test.tsx +1 -49
- package/src/screens/conversation_details_screen.tsx +0 -19
- package/src/screens/conversations/__tests__/conversations_screen.test.tsx +0 -1
- package/src/screens/conversations/conversations_screen.tsx +0 -2
- package/src/screens/index.ts +0 -1
- package/src/types/resources/conversation_membership.ts +0 -1
- package/build/components/display/toast.d.ts +0 -3
- package/build/components/display/toast.d.ts.map +0 -1
- package/build/components/display/toast.js +0 -224
- package/build/components/display/toast.js.map +0 -1
- package/build/hooks/use_hide_conversation.d.ts +0 -107
- package/build/hooks/use_hide_conversation.d.ts.map +0 -1
- package/build/hooks/use_hide_conversation.js +0 -238
- package/build/hooks/use_hide_conversation.js.map +0 -1
- package/build/hooks/use_hide_conversations_enabled.d.ts +0 -2
- package/build/hooks/use_hide_conversations_enabled.d.ts.map +0 -1
- package/build/hooks/use_hide_conversations_enabled.js +0 -18
- package/build/hooks/use_hide_conversations_enabled.js.map +0 -1
- package/build/screens/conversation_actions_screen.d.ts +0 -7
- package/build/screens/conversation_actions_screen.d.ts.map +0 -1
- package/build/screens/conversation_actions_screen.js +0 -89
- package/build/screens/conversation_actions_screen.js.map +0 -1
- package/build/utils/toast_store.d.ts +0 -21
- package/build/utils/toast_store.d.ts.map +0 -1
- package/build/utils/toast_store.js +0 -27
- package/build/utils/toast_store.js.map +0 -1
- package/src/components/display/__tests__/toast.test.tsx +0 -55
- package/src/components/display/toast.tsx +0 -115
- package/src/hooks/__tests__/use_hide_conversation.test.tsx +0 -147
- package/src/hooks/use_hide_conversation.ts +0 -118
- package/src/hooks/use_hide_conversations_enabled.ts +0 -7
- package/src/screens/__tests__/conversation_actions_screen.test.tsx +0 -79
- package/src/screens/conversation_actions_screen.tsx +0 -53
- package/src/utils/toast_store.ts +0 -45
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
-
import { useNavigation } from '@react-navigation/native';
|
|
3
2
|
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
4
3
|
import { Platform, Pressable, StyleSheet, View } from 'react-native';
|
|
5
4
|
import ReanimatedSwipeable from 'react-native-gesture-handler/ReanimatedSwipeable';
|
|
6
5
|
import { useConversationsContext } from '../../contexts/conversations_context';
|
|
7
6
|
import { useTheme, useCreateAndroidRippleColor } from '../../hooks';
|
|
8
7
|
import { useConversationsMarkRead, useConversationsMute } from '../../hooks/use_conversations_actions';
|
|
9
|
-
import { useHideConversation } from '../../hooks/use_hide_conversation';
|
|
10
|
-
import { useHideConversationsEnabled } from '../../hooks/use_hide_conversations_enabled';
|
|
11
8
|
import { isArchivedConversation, platformPressedOpacityStyle } from '../../utils';
|
|
12
|
-
import { Haptic } from '../../utils/native_adapters';
|
|
13
9
|
import { tokens } from '../../vendor/tapestry/tokens';
|
|
14
10
|
import { SwipeableToggleButton } from './swipeable_toggle_button';
|
|
15
11
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
12
|
export function ConversationActions(t0) {
|
|
17
|
-
const $ = _c(
|
|
13
|
+
const $ = _c(66);
|
|
18
14
|
const {
|
|
19
15
|
children,
|
|
20
16
|
conversation,
|
|
@@ -23,12 +19,10 @@ export function ConversationActions(t0) {
|
|
|
23
19
|
accessibilityLabel
|
|
24
20
|
} = t0;
|
|
25
21
|
const swipeableRef = useRef(null);
|
|
26
|
-
const navigation = useNavigation();
|
|
27
22
|
const styles = useStyles();
|
|
28
23
|
const {
|
|
29
24
|
activeConversationId,
|
|
30
|
-
setActiveConversationId
|
|
31
|
-
hideable
|
|
25
|
+
setActiveConversationId
|
|
32
26
|
} = useConversationsContext();
|
|
33
27
|
const [disabled, setDisabled] = useState(false);
|
|
34
28
|
const overshootLeft = Platform.OS === "ios";
|
|
@@ -73,344 +67,253 @@ export function ConversationActions(t0) {
|
|
|
73
67
|
markRead,
|
|
74
68
|
isPending: isMarkReadPending
|
|
75
69
|
} = useConversationsMarkRead(t3);
|
|
70
|
+
const isConversationEmpty = conversation.lastMessageCreatedAt === null;
|
|
76
71
|
let t4;
|
|
77
72
|
if ($[6] !== conversation) {
|
|
78
|
-
t4 =
|
|
79
|
-
conversation
|
|
80
|
-
};
|
|
73
|
+
t4 = isArchivedConversation(conversation);
|
|
81
74
|
$[6] = conversation;
|
|
82
75
|
$[7] = t4;
|
|
83
76
|
} else {
|
|
84
77
|
t4 = $[7];
|
|
85
78
|
}
|
|
86
|
-
const
|
|
87
|
-
hidden,
|
|
88
|
-
setHidden,
|
|
89
|
-
isPending: isHiddenPending
|
|
90
|
-
} = useHideConversation(t4);
|
|
91
|
-
const hideConversationsEnabled = useHideConversationsEnabled();
|
|
92
|
-
const isConversationEmpty = conversation.lastMessageCreatedAt === null;
|
|
79
|
+
const canMute = !t4;
|
|
93
80
|
let t5;
|
|
94
|
-
if ($[8]
|
|
95
|
-
t5 =
|
|
96
|
-
|
|
97
|
-
|
|
81
|
+
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
82
|
+
t5 = () => {
|
|
83
|
+
setDisabled(false);
|
|
84
|
+
swipeableRef.current?.close();
|
|
85
|
+
};
|
|
86
|
+
$[8] = t5;
|
|
98
87
|
} else {
|
|
99
|
-
t5 = $[
|
|
88
|
+
t5 = $[8];
|
|
100
89
|
}
|
|
101
|
-
const
|
|
90
|
+
const handleSwipeableClose = t5;
|
|
102
91
|
let t6;
|
|
103
|
-
if ($[
|
|
104
|
-
t6 =
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
$[
|
|
92
|
+
if ($[9] !== conversation.id || $[10] !== setActiveConversationId) {
|
|
93
|
+
t6 = () => {
|
|
94
|
+
setDisabled(true);
|
|
95
|
+
setActiveConversationId(conversation.id);
|
|
96
|
+
};
|
|
97
|
+
$[9] = conversation.id;
|
|
98
|
+
$[10] = setActiveConversationId;
|
|
99
|
+
$[11] = t6;
|
|
109
100
|
} else {
|
|
110
|
-
t6 = $[
|
|
101
|
+
t6 = $[11];
|
|
111
102
|
}
|
|
112
|
-
const
|
|
103
|
+
const handleSwipeableOpen = t6;
|
|
113
104
|
let t7;
|
|
114
|
-
if ($[
|
|
105
|
+
if ($[12] !== disabled || $[13] !== onPress) {
|
|
115
106
|
t7 = () => {
|
|
116
|
-
|
|
117
|
-
|
|
107
|
+
if (disabled || !onPress) {
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
onPress();
|
|
118
111
|
};
|
|
112
|
+
$[12] = disabled;
|
|
113
|
+
$[13] = onPress;
|
|
119
114
|
$[14] = t7;
|
|
120
115
|
} else {
|
|
121
116
|
t7 = $[14];
|
|
122
117
|
}
|
|
123
|
-
const
|
|
118
|
+
const handlePress = t7;
|
|
124
119
|
let t8;
|
|
125
|
-
if ($[15] !==
|
|
120
|
+
if ($[15] !== muted || $[16] !== setMuted) {
|
|
126
121
|
t8 = () => {
|
|
127
|
-
|
|
128
|
-
|
|
122
|
+
setMuted(!muted);
|
|
123
|
+
handleSwipeableClose();
|
|
129
124
|
};
|
|
130
|
-
$[15] =
|
|
131
|
-
$[16] =
|
|
125
|
+
$[15] = muted;
|
|
126
|
+
$[16] = setMuted;
|
|
132
127
|
$[17] = t8;
|
|
133
128
|
} else {
|
|
134
129
|
t8 = $[17];
|
|
135
130
|
}
|
|
136
|
-
const
|
|
131
|
+
const handleMute = t8;
|
|
137
132
|
let t9;
|
|
138
|
-
if ($[18] !==
|
|
133
|
+
if ($[18] !== markRead || $[19] !== read) {
|
|
139
134
|
t9 = () => {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
}
|
|
143
|
-
onPress();
|
|
135
|
+
markRead(!read);
|
|
136
|
+
handleSwipeableClose();
|
|
144
137
|
};
|
|
145
|
-
$[18] =
|
|
146
|
-
$[19] =
|
|
138
|
+
$[18] = markRead;
|
|
139
|
+
$[19] = read;
|
|
147
140
|
$[20] = t9;
|
|
148
141
|
} else {
|
|
149
142
|
t9 = $[20];
|
|
150
143
|
}
|
|
151
|
-
const
|
|
144
|
+
const handleLatestMessageUnread = t9;
|
|
152
145
|
let t10;
|
|
153
|
-
if ($[21] !==
|
|
154
|
-
t10 =
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
};
|
|
158
|
-
$[21] =
|
|
159
|
-
$[22] =
|
|
146
|
+
if ($[21] !== isConversationEmpty || $[22] !== read) {
|
|
147
|
+
t10 = !isConversationEmpty ? [{
|
|
148
|
+
name: read ? "markUnread" : "markRead",
|
|
149
|
+
label: read ? "Mark unread" : "Mark read"
|
|
150
|
+
}] : [];
|
|
151
|
+
$[21] = isConversationEmpty;
|
|
152
|
+
$[22] = read;
|
|
160
153
|
$[23] = t10;
|
|
161
154
|
} else {
|
|
162
155
|
t10 = $[23];
|
|
163
156
|
}
|
|
164
|
-
const
|
|
157
|
+
const readAccessibilityAction = t10;
|
|
165
158
|
let t11;
|
|
166
|
-
if ($[24] !==
|
|
167
|
-
t11 =
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
};
|
|
171
|
-
$[24] =
|
|
172
|
-
$[25] =
|
|
159
|
+
if ($[24] !== canMute || $[25] !== muted) {
|
|
160
|
+
t11 = canMute ? [{
|
|
161
|
+
name: muted ? "unmute" : "mute",
|
|
162
|
+
label: muted ? "Enable" : "Silence"
|
|
163
|
+
}] : [];
|
|
164
|
+
$[24] = canMute;
|
|
165
|
+
$[25] = muted;
|
|
173
166
|
$[26] = t11;
|
|
174
167
|
} else {
|
|
175
168
|
t11 = $[26];
|
|
176
169
|
}
|
|
177
|
-
const
|
|
170
|
+
const muteAccessibilityAction = t11;
|
|
178
171
|
let t12;
|
|
179
|
-
if ($[27] !==
|
|
180
|
-
t12 =
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
Haptic.impactLight();
|
|
185
|
-
navigation.navigate("ConversationActions", {
|
|
186
|
-
conversation_id: conversation.id
|
|
187
|
-
});
|
|
188
|
-
};
|
|
189
|
-
$[27] = conversation.id;
|
|
190
|
-
$[28] = disabled;
|
|
191
|
-
$[29] = navigation;
|
|
192
|
-
$[30] = t12;
|
|
172
|
+
if ($[27] !== muteAccessibilityAction || $[28] !== readAccessibilityAction) {
|
|
173
|
+
t12 = [...muteAccessibilityAction, ...readAccessibilityAction];
|
|
174
|
+
$[27] = muteAccessibilityAction;
|
|
175
|
+
$[28] = readAccessibilityAction;
|
|
176
|
+
$[29] = t12;
|
|
193
177
|
} else {
|
|
194
|
-
t12 = $[
|
|
178
|
+
t12 = $[29];
|
|
195
179
|
}
|
|
196
|
-
const
|
|
180
|
+
const accessibilityActions = t12;
|
|
197
181
|
let t13;
|
|
198
|
-
if ($[
|
|
199
|
-
t13 =
|
|
200
|
-
|
|
201
|
-
handleSwipeableClose();
|
|
202
|
-
};
|
|
203
|
-
$[31] = markRead;
|
|
204
|
-
$[32] = read;
|
|
205
|
-
$[33] = t13;
|
|
206
|
-
} else {
|
|
207
|
-
t13 = $[33];
|
|
208
|
-
}
|
|
209
|
-
const handleLatestMessageUnread = t13;
|
|
210
|
-
let t14;
|
|
211
|
-
if ($[34] !== isConversationEmpty || $[35] !== read) {
|
|
212
|
-
t14 = !isConversationEmpty ? [{
|
|
213
|
-
name: read ? "markUnread" : "markRead",
|
|
214
|
-
label: read ? "Mark unread" : "Mark read"
|
|
215
|
-
}] : [];
|
|
216
|
-
$[34] = isConversationEmpty;
|
|
217
|
-
$[35] = read;
|
|
218
|
-
$[36] = t14;
|
|
219
|
-
} else {
|
|
220
|
-
t14 = $[36];
|
|
221
|
-
}
|
|
222
|
-
const readAccessibilityAction = t14;
|
|
223
|
-
let t15;
|
|
224
|
-
if ($[37] !== canMute || $[38] !== muted) {
|
|
225
|
-
t15 = canMute ? [{
|
|
226
|
-
name: muted ? "unmute" : "mute",
|
|
227
|
-
label: muted ? "Enable" : "Silence"
|
|
228
|
-
}] : [];
|
|
229
|
-
$[37] = canMute;
|
|
230
|
-
$[38] = muted;
|
|
231
|
-
$[39] = t15;
|
|
232
|
-
} else {
|
|
233
|
-
t15 = $[39];
|
|
234
|
-
}
|
|
235
|
-
const muteAccessibilityAction = t15;
|
|
236
|
-
let t16;
|
|
237
|
-
if ($[40] !== canHide || $[41] !== hidden) {
|
|
238
|
-
t16 = canHide ? [{
|
|
239
|
-
name: hidden ? "unhide" : "hide",
|
|
240
|
-
label: hidden ? "Unhide" : "Hide"
|
|
241
|
-
}] : [];
|
|
242
|
-
$[40] = canHide;
|
|
243
|
-
$[41] = hidden;
|
|
244
|
-
$[42] = t16;
|
|
245
|
-
} else {
|
|
246
|
-
t16 = $[42];
|
|
247
|
-
}
|
|
248
|
-
const hideAccessibilityAction = t16;
|
|
249
|
-
let t17;
|
|
250
|
-
if ($[43] !== hideAccessibilityAction || $[44] !== muteAccessibilityAction || $[45] !== readAccessibilityAction) {
|
|
251
|
-
t17 = [...muteAccessibilityAction, ...hideAccessibilityAction, ...readAccessibilityAction];
|
|
252
|
-
$[43] = hideAccessibilityAction;
|
|
253
|
-
$[44] = muteAccessibilityAction;
|
|
254
|
-
$[45] = readAccessibilityAction;
|
|
255
|
-
$[46] = t17;
|
|
256
|
-
} else {
|
|
257
|
-
t17 = $[46];
|
|
258
|
-
}
|
|
259
|
-
const accessibilityActions = t17;
|
|
260
|
-
let t18;
|
|
261
|
-
if ($[47] !== handleHide || $[48] !== handleLatestMessageUnread || $[49] !== handleMute) {
|
|
262
|
-
t18 = event => {
|
|
263
|
-
bb70: switch (event.nativeEvent.actionName) {
|
|
182
|
+
if ($[30] !== handleLatestMessageUnread || $[31] !== handleMute) {
|
|
183
|
+
t13 = event => {
|
|
184
|
+
bb45: switch (event.nativeEvent.actionName) {
|
|
264
185
|
case "markRead":
|
|
265
186
|
{
|
|
266
187
|
handleLatestMessageUnread();
|
|
267
|
-
break
|
|
188
|
+
break bb45;
|
|
268
189
|
}
|
|
269
190
|
case "markUnread":
|
|
270
191
|
{
|
|
271
192
|
handleLatestMessageUnread();
|
|
272
|
-
break
|
|
193
|
+
break bb45;
|
|
273
194
|
}
|
|
274
195
|
case "mute":
|
|
275
196
|
{
|
|
276
197
|
handleMute();
|
|
277
|
-
break
|
|
198
|
+
break bb45;
|
|
278
199
|
}
|
|
279
200
|
case "unmute":
|
|
280
201
|
{
|
|
281
202
|
handleMute();
|
|
282
|
-
break bb70;
|
|
283
|
-
}
|
|
284
|
-
case "hide":
|
|
285
|
-
case "unhide":
|
|
286
|
-
{
|
|
287
|
-
handleHide();
|
|
288
203
|
}
|
|
289
204
|
}
|
|
290
205
|
};
|
|
291
|
-
$[
|
|
292
|
-
$[
|
|
293
|
-
$[
|
|
294
|
-
$[50] = t18;
|
|
206
|
+
$[30] = handleLatestMessageUnread;
|
|
207
|
+
$[31] = handleMute;
|
|
208
|
+
$[32] = t13;
|
|
295
209
|
} else {
|
|
296
|
-
|
|
210
|
+
t13 = $[32];
|
|
297
211
|
}
|
|
298
|
-
const handleAccessibilityAction =
|
|
299
|
-
let
|
|
300
|
-
let
|
|
301
|
-
if ($[
|
|
302
|
-
|
|
212
|
+
const handleAccessibilityAction = t13;
|
|
213
|
+
let t14;
|
|
214
|
+
let t15;
|
|
215
|
+
if ($[33] !== activeConversationId || $[34] !== conversation.id) {
|
|
216
|
+
t14 = () => {
|
|
303
217
|
if (activeConversationId === conversation.id) {
|
|
304
218
|
return;
|
|
305
219
|
}
|
|
306
220
|
handleSwipeableClose();
|
|
307
221
|
};
|
|
308
|
-
|
|
309
|
-
$[
|
|
310
|
-
$[
|
|
311
|
-
$[
|
|
312
|
-
$[
|
|
222
|
+
t15 = [activeConversationId, conversation.id, handleSwipeableClose];
|
|
223
|
+
$[33] = activeConversationId;
|
|
224
|
+
$[34] = conversation.id;
|
|
225
|
+
$[35] = t14;
|
|
226
|
+
$[36] = t15;
|
|
313
227
|
} else {
|
|
314
|
-
|
|
315
|
-
|
|
228
|
+
t14 = $[35];
|
|
229
|
+
t15 = $[36];
|
|
316
230
|
}
|
|
317
|
-
useEffect(
|
|
318
|
-
let
|
|
319
|
-
if ($[
|
|
320
|
-
|
|
321
|
-
$[
|
|
231
|
+
useEffect(t14, t15);
|
|
232
|
+
let t16;
|
|
233
|
+
if ($[37] === Symbol.for("react.memo_cache_sentinel")) {
|
|
234
|
+
t16 = () => setDisabled(false);
|
|
235
|
+
$[37] = t16;
|
|
322
236
|
} else {
|
|
323
|
-
|
|
237
|
+
t16 = $[37];
|
|
324
238
|
}
|
|
325
|
-
let
|
|
326
|
-
if ($[
|
|
327
|
-
|
|
239
|
+
let t17;
|
|
240
|
+
if ($[38] !== canMute || $[39] !== handleLatestMessageUnread || $[40] !== handleMute || $[41] !== isConversationEmpty || $[42] !== isMarkReadPending || $[43] !== isMutedPending || $[44] !== muted || $[45] !== read) {
|
|
241
|
+
t17 = () => /*#__PURE__*/_jsx(LeftActions, {
|
|
328
242
|
isConversationEmpty: isConversationEmpty,
|
|
329
243
|
canMute: canMute,
|
|
330
|
-
canHide: canHide,
|
|
331
244
|
handleMute: handleMute,
|
|
332
|
-
handleHide: handleHide,
|
|
333
245
|
handleLatestMessageUnread: handleLatestMessageUnread,
|
|
334
246
|
muted: muted,
|
|
335
|
-
hidden: hidden,
|
|
336
247
|
read: read,
|
|
337
248
|
isMutedPending: isMutedPending,
|
|
338
|
-
isHiddenPending: isHiddenPending,
|
|
339
249
|
isMarkReadPending: isMarkReadPending
|
|
340
250
|
});
|
|
341
|
-
$[
|
|
342
|
-
$[
|
|
343
|
-
$[
|
|
344
|
-
$[
|
|
345
|
-
$[
|
|
346
|
-
$[
|
|
347
|
-
$[
|
|
348
|
-
$[
|
|
349
|
-
$[
|
|
350
|
-
$[65] = isMutedPending;
|
|
351
|
-
$[66] = muted;
|
|
352
|
-
$[67] = read;
|
|
353
|
-
$[68] = t22;
|
|
251
|
+
$[38] = canMute;
|
|
252
|
+
$[39] = handleLatestMessageUnread;
|
|
253
|
+
$[40] = handleMute;
|
|
254
|
+
$[41] = isConversationEmpty;
|
|
255
|
+
$[42] = isMarkReadPending;
|
|
256
|
+
$[43] = isMutedPending;
|
|
257
|
+
$[44] = muted;
|
|
258
|
+
$[45] = read;
|
|
259
|
+
$[46] = t17;
|
|
354
260
|
} else {
|
|
355
|
-
|
|
261
|
+
t17 = $[46];
|
|
356
262
|
}
|
|
357
|
-
const
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
t25 = t26 => {
|
|
263
|
+
const t18 = `conversation-${conversation.id}`;
|
|
264
|
+
let t19;
|
|
265
|
+
if ($[47] !== style) {
|
|
266
|
+
t19 = t20 => {
|
|
362
267
|
const {
|
|
363
268
|
pressed
|
|
364
|
-
} =
|
|
269
|
+
} = t20;
|
|
365
270
|
return [style, pressed && platformPressedOpacityStyle];
|
|
366
271
|
};
|
|
367
|
-
$[
|
|
368
|
-
$[
|
|
272
|
+
$[47] = style;
|
|
273
|
+
$[48] = t19;
|
|
369
274
|
} else {
|
|
370
|
-
|
|
275
|
+
t19 = $[48];
|
|
371
276
|
}
|
|
372
|
-
let
|
|
373
|
-
if ($[
|
|
374
|
-
|
|
277
|
+
let t20;
|
|
278
|
+
if ($[49] !== androidRippleColor) {
|
|
279
|
+
t20 = {
|
|
375
280
|
color: androidRippleColor,
|
|
376
281
|
borderless: false,
|
|
377
282
|
foreground: true
|
|
378
283
|
};
|
|
379
|
-
$[
|
|
380
|
-
$[
|
|
284
|
+
$[49] = androidRippleColor;
|
|
285
|
+
$[50] = t20;
|
|
381
286
|
} else {
|
|
382
|
-
|
|
287
|
+
t20 = $[50];
|
|
383
288
|
}
|
|
384
|
-
let
|
|
385
|
-
if ($[
|
|
386
|
-
|
|
387
|
-
testID:
|
|
289
|
+
let t21;
|
|
290
|
+
if ($[51] !== accessibilityActions || $[52] !== accessibilityLabel || $[53] !== children || $[54] !== handleAccessibilityAction || $[55] !== handlePress || $[56] !== t18 || $[57] !== t19 || $[58] !== t20) {
|
|
291
|
+
t21 = /*#__PURE__*/_jsx(Pressable, {
|
|
292
|
+
testID: t18,
|
|
388
293
|
onPress: handlePress,
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
android_ripple: t26,
|
|
294
|
+
style: t19,
|
|
295
|
+
android_ripple: t20,
|
|
392
296
|
accessibilityLabel: accessibilityLabel,
|
|
393
297
|
accessibilityRole: "button",
|
|
394
298
|
accessibilityActions: accessibilityActions,
|
|
395
299
|
onAccessibilityAction: handleAccessibilityAction,
|
|
396
300
|
children: children
|
|
397
301
|
});
|
|
398
|
-
$[
|
|
399
|
-
$[
|
|
400
|
-
$[
|
|
401
|
-
$[
|
|
402
|
-
$[
|
|
403
|
-
$[
|
|
404
|
-
$[
|
|
405
|
-
$[
|
|
406
|
-
$[
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
t27 = $[82];
|
|
302
|
+
$[51] = accessibilityActions;
|
|
303
|
+
$[52] = accessibilityLabel;
|
|
304
|
+
$[53] = children;
|
|
305
|
+
$[54] = handleAccessibilityAction;
|
|
306
|
+
$[55] = handlePress;
|
|
307
|
+
$[56] = t18;
|
|
308
|
+
$[57] = t19;
|
|
309
|
+
$[58] = t20;
|
|
310
|
+
$[59] = t21;
|
|
311
|
+
} else {
|
|
312
|
+
t21 = $[59];
|
|
410
313
|
}
|
|
411
|
-
let
|
|
412
|
-
if ($[
|
|
413
|
-
|
|
314
|
+
let t22;
|
|
315
|
+
if ($[60] !== handleSwipeableOpen || $[61] !== styles.swipeableChildContainer || $[62] !== styles.swipeableContainer || $[63] !== t17 || $[64] !== t21) {
|
|
316
|
+
t22 = /*#__PURE__*/_jsx(ReanimatedSwipeable, {
|
|
414
317
|
ref: swipeableRef,
|
|
415
318
|
childrenContainerStyle: styles.swipeableChildContainer,
|
|
416
319
|
containerStyle: styles.swipeableContainer,
|
|
@@ -418,42 +321,38 @@ export function ConversationActions(t0) {
|
|
|
418
321
|
overshootLeft: overshootLeft,
|
|
419
322
|
overshootRight: false,
|
|
420
323
|
onSwipeableOpenStartDrag: handleSwipeableOpen,
|
|
421
|
-
onSwipeableClose:
|
|
324
|
+
onSwipeableClose: t16,
|
|
422
325
|
renderRightActions: _temp,
|
|
423
|
-
renderLeftActions:
|
|
424
|
-
children:
|
|
326
|
+
renderLeftActions: t17,
|
|
327
|
+
children: t21
|
|
425
328
|
});
|
|
426
|
-
$[
|
|
427
|
-
$[
|
|
428
|
-
$[
|
|
429
|
-
$[
|
|
430
|
-
$[
|
|
431
|
-
$[
|
|
329
|
+
$[60] = handleSwipeableOpen;
|
|
330
|
+
$[61] = styles.swipeableChildContainer;
|
|
331
|
+
$[62] = styles.swipeableContainer;
|
|
332
|
+
$[63] = t17;
|
|
333
|
+
$[64] = t21;
|
|
334
|
+
$[65] = t22;
|
|
432
335
|
} else {
|
|
433
|
-
|
|
336
|
+
t22 = $[65];
|
|
434
337
|
}
|
|
435
|
-
return
|
|
338
|
+
return t22;
|
|
436
339
|
}
|
|
437
340
|
function _temp() {
|
|
438
341
|
return /*#__PURE__*/_jsx(_Fragment, {});
|
|
439
342
|
}
|
|
440
343
|
function LeftActions(t0) {
|
|
441
|
-
const $ = _c(
|
|
344
|
+
const $ = _c(18);
|
|
442
345
|
const {
|
|
443
346
|
isConversationEmpty,
|
|
444
347
|
canMute,
|
|
445
|
-
canHide,
|
|
446
348
|
handleMute,
|
|
447
|
-
handleHide,
|
|
448
349
|
handleLatestMessageUnread,
|
|
449
350
|
muted,
|
|
450
|
-
hidden,
|
|
451
351
|
read,
|
|
452
352
|
isMutedPending,
|
|
453
|
-
isHiddenPending,
|
|
454
353
|
isMarkReadPending
|
|
455
354
|
} = t0;
|
|
456
|
-
const t1 =
|
|
355
|
+
const t1 = canMute ? 2 : 1;
|
|
457
356
|
let t2;
|
|
458
357
|
if ($[0] !== t1) {
|
|
459
358
|
t2 = {
|
|
@@ -485,23 +384,6 @@ function LeftActions(t0) {
|
|
|
485
384
|
let t4;
|
|
486
385
|
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
487
386
|
t4 = {
|
|
488
|
-
true: {
|
|
489
|
-
iconName: "general.showEye",
|
|
490
|
-
label: "Unhide"
|
|
491
|
-
},
|
|
492
|
-
false: {
|
|
493
|
-
iconName: "general.hideEye",
|
|
494
|
-
label: "Hide"
|
|
495
|
-
}
|
|
496
|
-
};
|
|
497
|
-
$[3] = t4;
|
|
498
|
-
} else {
|
|
499
|
-
t4 = $[3];
|
|
500
|
-
}
|
|
501
|
-
const hideToggleContent = t4;
|
|
502
|
-
let t5;
|
|
503
|
-
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
504
|
-
t5 = {
|
|
505
387
|
true: {
|
|
506
388
|
iconName: "general.outlinedTextMessage",
|
|
507
389
|
label: "Mark read"
|
|
@@ -511,79 +393,61 @@ function LeftActions(t0) {
|
|
|
511
393
|
label: "Mark unread"
|
|
512
394
|
}
|
|
513
395
|
};
|
|
514
|
-
$[
|
|
396
|
+
$[3] = t4;
|
|
515
397
|
} else {
|
|
516
|
-
|
|
398
|
+
t4 = $[3];
|
|
517
399
|
}
|
|
518
|
-
const latestMessageUnreadToggleContent =
|
|
519
|
-
const
|
|
520
|
-
let
|
|
521
|
-
if ($[
|
|
522
|
-
|
|
400
|
+
const latestMessageUnreadToggleContent = t4;
|
|
401
|
+
const t5 = !read;
|
|
402
|
+
let t6;
|
|
403
|
+
if ($[4] !== handleLatestMessageUnread || $[5] !== isConversationEmpty || $[6] !== isMarkReadPending || $[7] !== t5) {
|
|
404
|
+
t6 = /*#__PURE__*/_jsx(SwipeableToggleButton, {
|
|
523
405
|
loading: isMarkReadPending,
|
|
524
406
|
disabled: isConversationEmpty,
|
|
525
|
-
toggled:
|
|
407
|
+
toggled: t5,
|
|
526
408
|
onPress: handleLatestMessageUnread,
|
|
527
409
|
toggleContent: latestMessageUnreadToggleContent,
|
|
528
410
|
backgroundColor: tokens.fillColorInteractionSwipeDefault
|
|
529
411
|
});
|
|
530
|
-
$[
|
|
531
|
-
$[
|
|
532
|
-
$[
|
|
412
|
+
$[4] = handleLatestMessageUnread;
|
|
413
|
+
$[5] = isConversationEmpty;
|
|
414
|
+
$[6] = isMarkReadPending;
|
|
415
|
+
$[7] = t5;
|
|
533
416
|
$[8] = t6;
|
|
534
|
-
$[9] = t7;
|
|
535
417
|
} else {
|
|
536
|
-
|
|
418
|
+
t6 = $[8];
|
|
537
419
|
}
|
|
538
|
-
let
|
|
539
|
-
if ($[
|
|
540
|
-
|
|
420
|
+
let t7;
|
|
421
|
+
if ($[9] !== canMute || $[10] !== handleMute || $[11] !== isMutedPending || $[12] !== muted) {
|
|
422
|
+
t7 = canMute && /*#__PURE__*/_jsx(SwipeableToggleButton, {
|
|
541
423
|
loading: isMutedPending,
|
|
542
424
|
toggled: muted,
|
|
543
425
|
onPress: handleMute,
|
|
544
426
|
toggleContent: muteToggleContent,
|
|
545
427
|
backgroundColor: tokens.fillColorInteractionSwipeSecondary
|
|
546
428
|
});
|
|
547
|
-
$[
|
|
548
|
-
$[
|
|
549
|
-
$[
|
|
550
|
-
$[
|
|
551
|
-
$[
|
|
429
|
+
$[9] = canMute;
|
|
430
|
+
$[10] = handleMute;
|
|
431
|
+
$[11] = isMutedPending;
|
|
432
|
+
$[12] = muted;
|
|
433
|
+
$[13] = t7;
|
|
552
434
|
} else {
|
|
553
|
-
|
|
435
|
+
t7 = $[13];
|
|
554
436
|
}
|
|
555
|
-
let
|
|
556
|
-
if ($[
|
|
557
|
-
|
|
558
|
-
loading: isHiddenPending,
|
|
559
|
-
toggled: hidden,
|
|
560
|
-
onPress: handleHide,
|
|
561
|
-
toggleContent: hideToggleContent,
|
|
562
|
-
backgroundColor: tokens.colorNeutral45
|
|
563
|
-
});
|
|
564
|
-
$[15] = canHide;
|
|
565
|
-
$[16] = handleHide;
|
|
566
|
-
$[17] = hidden;
|
|
567
|
-
$[18] = isHiddenPending;
|
|
568
|
-
$[19] = t9;
|
|
569
|
-
} else {
|
|
570
|
-
t9 = $[19];
|
|
571
|
-
}
|
|
572
|
-
let t10;
|
|
573
|
-
if ($[20] !== styles.actionButtonContainer || $[21] !== t7 || $[22] !== t8 || $[23] !== t9) {
|
|
574
|
-
t10 = /*#__PURE__*/_jsxs(View, {
|
|
437
|
+
let t8;
|
|
438
|
+
if ($[14] !== styles.actionButtonContainer || $[15] !== t6 || $[16] !== t7) {
|
|
439
|
+
t8 = /*#__PURE__*/_jsxs(View, {
|
|
575
440
|
style: styles.actionButtonContainer,
|
|
576
|
-
children: [
|
|
441
|
+
children: [t6, t7]
|
|
577
442
|
});
|
|
578
|
-
$[
|
|
579
|
-
$[
|
|
580
|
-
$[
|
|
581
|
-
$[
|
|
582
|
-
$[24] = t10;
|
|
443
|
+
$[14] = styles.actionButtonContainer;
|
|
444
|
+
$[15] = t6;
|
|
445
|
+
$[16] = t7;
|
|
446
|
+
$[17] = t8;
|
|
583
447
|
} else {
|
|
584
|
-
|
|
448
|
+
t8 = $[17];
|
|
585
449
|
}
|
|
586
|
-
return
|
|
450
|
+
return t8;
|
|
587
451
|
}
|
|
588
452
|
const ACTION_BUTTON_WIDTH = 120;
|
|
589
453
|
const useStyles = t0 => {
|