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