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