@planningcenter/chat-react-native 4.4.1-qa-staging.17 → 4.4.1-qa-staging.19
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/archived_results_footer.d.ts +6 -0
- package/build/components/conversations/archived_results_footer.d.ts.map +1 -0
- package/build/components/conversations/archived_results_footer.js +51 -0
- package/build/components/conversations/archived_results_footer.js.map +1 -0
- package/build/components/conversations/conversation_actions.d.ts.map +1 -1
- package/build/components/conversations/conversation_actions.js +241 -206
- 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 +99 -93
- 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 +44 -35
- package/build/components/conversations/conversations.js.map +1 -1
- package/build/components/display/filter_dropdown.d.ts +2 -1
- package/build/components/display/filter_dropdown.d.ts.map +1 -1
- package/build/components/display/filter_dropdown.js +63 -58
- package/build/components/display/filter_dropdown.js.map +1 -1
- package/build/components/display/icon_tile.d.ts +12 -0
- package/build/components/display/icon_tile.d.ts.map +1 -0
- package/build/components/display/icon_tile.js +109 -0
- package/build/components/display/icon_tile.js.map +1 -0
- package/build/components/display/index.d.ts +1 -0
- package/build/components/display/index.d.ts.map +1 -1
- package/build/components/display/index.js +1 -0
- package/build/components/display/index.js.map +1 -1
- package/build/contexts/conversations_context.d.ts.map +1 -1
- package/build/contexts/conversations_context.js +21 -18
- package/build/contexts/conversations_context.js.map +1 -1
- package/build/hooks/index.d.ts +2 -0
- package/build/hooks/index.d.ts.map +1 -1
- package/build/hooks/index.js +2 -0
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/use_can_browse_archived_conversations.d.ts +2 -0
- package/build/hooks/use_can_browse_archived_conversations.d.ts.map +1 -0
- package/build/hooks/use_can_browse_archived_conversations.js +29 -0
- package/build/hooks/use_can_browse_archived_conversations.js.map +1 -0
- package/build/hooks/use_clear_conversation_filters.d.ts.map +1 -1
- package/build/hooks/use_clear_conversation_filters.js +2 -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 +32 -24
- package/build/hooks/use_conversation.js.map +1 -1
- package/build/hooks/use_current_person.d.ts.map +1 -1
- package/build/hooks/use_current_person.js +1 -1
- package/build/hooks/use_current_person.js.map +1 -1
- package/build/hooks/use_jolt.d.ts.map +1 -1
- package/build/hooks/use_jolt.js +29 -8
- package/build/hooks/use_jolt.js.map +1 -1
- package/build/hooks/use_manual_archiving_enabled.d.ts +2 -0
- package/build/hooks/use_manual_archiving_enabled.d.ts.map +1 -0
- package/build/hooks/use_manual_archiving_enabled.js +18 -0
- package/build/hooks/use_manual_archiving_enabled.js.map +1 -0
- package/build/screens/conversation_details_screen.d.ts.map +1 -1
- package/build/screens/conversation_details_screen.js +2 -1
- 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 +80 -13
- package/build/screens/conversation_filters/components/conversation_filters.js.map +1 -1
- package/build/screens/conversation_filters/components/rows.d.ts +9 -0
- package/build/screens/conversation_filters/components/rows.d.ts.map +1 -1
- package/build/screens/conversation_filters/components/rows.js +92 -1
- 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 +8 -4
- 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/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/conversation_filters_screen.d.ts +1 -0
- package/build/screens/conversation_filters_screen.d.ts.map +1 -1
- package/build/screens/conversation_filters_screen.js +75 -49
- package/build/screens/conversation_filters_screen.js.map +1 -1
- package/build/screens/conversations/components/filter_dropdown_list_header_component.d.ts +2 -0
- package/build/screens/conversations/components/filter_dropdown_list_header_component.d.ts.map +1 -0
- package/build/screens/conversations/components/filter_dropdown_list_header_component.js +580 -0
- package/build/screens/conversations/components/filter_dropdown_list_header_component.js.map +1 -0
- 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 +15 -2
- package/build/screens/conversations/conversations_screen.js.map +1 -1
- package/build/types/resources/person.d.ts +1 -0
- package/build/types/resources/person.d.ts.map +1 -1
- package/build/types/resources/person.js.map +1 -1
- package/build/utils/date.d.ts.map +1 -1
- package/build/utils/date.js +5 -10
- package/build/utils/date.js.map +1 -1
- package/build/utils/native_adapters/menu.d.ts +1 -0
- package/build/utils/native_adapters/menu.d.ts.map +1 -1
- package/build/utils/native_adapters/menu.js +1 -0
- package/build/utils/native_adapters/menu.js.map +1 -1
- package/build/utils/request/conversation.d.ts +2 -1
- package/build/utils/request/conversation.d.ts.map +1 -1
- package/build/utils/request/conversation.js +4 -1
- package/build/utils/request/conversation.js.map +1 -1
- 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__/hooks/use_can_browse_archived_conversations.test.tsx +98 -0
- package/src/__tests__/screens/conversation_filters/components/conversation_filters.test.tsx +3 -0
- package/src/__tests__/screens/conversation_filters_screen.test.tsx +76 -0
- package/src/components/conversations/__tests__/conversation_actions.test.tsx +67 -0
- package/src/components/conversations/__tests__/conversation_preview.test.tsx +38 -3
- package/src/components/conversations/__tests__/conversations.test.tsx +82 -0
- package/src/components/conversations/__tests__/conversations_blank_state.test.tsx +1 -0
- package/src/components/conversations/archived_results_footer.tsx +36 -0
- package/src/components/conversations/conversation_actions.tsx +27 -19
- package/src/components/conversations/conversation_preview.tsx +30 -10
- package/src/components/conversations/conversations.tsx +15 -3
- package/src/components/display/__tests__/filter_dropdown.test.tsx +9 -1
- package/src/components/display/filter_dropdown.tsx +14 -13
- package/src/components/display/icon_tile.tsx +54 -0
- package/src/components/display/index.ts +1 -0
- package/src/contexts/conversations_context.tsx +2 -1
- package/src/hooks/__tests__/use_conversation_archive.test.tsx +22 -0
- package/src/hooks/__tests__/use_jolt.test.tsx +30 -8
- package/src/hooks/index.ts +2 -0
- package/src/hooks/use_can_browse_archived_conversations.ts +17 -0
- package/src/hooks/use_clear_conversation_filters.ts +1 -0
- package/src/hooks/use_conversation.ts +4 -1
- package/src/hooks/use_current_person.ts +1 -0
- package/src/hooks/use_jolt.ts +33 -8
- package/src/hooks/use_manual_archiving_enabled.ts +10 -0
- package/src/screens/conversation_details_screen.tsx +2 -3
- package/src/screens/conversation_filters/__tests__/conversation_filters.test.tsx +101 -0
- package/src/screens/conversation_filters/components/conversation_filters.tsx +32 -2
- package/src/screens/conversation_filters/components/rows.tsx +29 -1
- 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/conversation_filters_screen.tsx +20 -4
- package/src/screens/conversations/__tests__/conversations_screen.test.tsx +52 -0
- package/src/screens/conversations/components/__tests__/filter_dropdown_list_header_component.test.tsx +259 -0
- package/src/screens/conversations/components/__tests__/list_header_component.test.tsx +21 -4
- package/src/screens/conversations/components/filter_dropdown_list_header_component.tsx +286 -0
- package/src/screens/conversations/components/list_header_component.tsx +17 -12
- package/src/screens/conversations/components/search_list_header_component.tsx +17 -12
- package/src/screens/conversations/conversations_screen.tsx +15 -2
- package/src/types/resources/person.ts +1 -0
- package/src/utils/__tests__/conversation.test.ts +1 -0
- package/src/utils/__tests__/date.test.ts +4 -0
- package/src/utils/date.ts +5 -4
- package/src/utils/native_adapters/__tests__/menu.test.tsx +6 -2
- package/src/utils/native_adapters/menu.tsx +2 -0
- package/src/utils/request/conversation.ts +4 -0
- package/src/vendor/font_awesome_pro_solid_icons.ts +12 -0
|
@@ -5,12 +5,12 @@ import ReanimatedSwipeable from 'react-native-gesture-handler/ReanimatedSwipeabl
|
|
|
5
5
|
import { useConversationsContext } from '../../contexts/conversations_context';
|
|
6
6
|
import { useTheme, useCreateAndroidRippleColor } from '../../hooks';
|
|
7
7
|
import { useConversationsMarkRead, useConversationsMute } from '../../hooks/use_conversations_actions';
|
|
8
|
-
import { platformPressedOpacityStyle } from '../../utils';
|
|
8
|
+
import { isArchivedConversation, platformPressedOpacityStyle } from '../../utils';
|
|
9
9
|
import { tokens } from '../../vendor/tapestry/tokens';
|
|
10
10
|
import { SwipeableToggleButton } from './swipeable_toggle_button';
|
|
11
11
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
12
|
export function ConversationActions(t0) {
|
|
13
|
-
const $ = _c(
|
|
13
|
+
const $ = _c(66);
|
|
14
14
|
const {
|
|
15
15
|
children,
|
|
16
16
|
conversation,
|
|
@@ -69,125 +69,133 @@ export function ConversationActions(t0) {
|
|
|
69
69
|
} = useConversationsMarkRead(t3);
|
|
70
70
|
const isConversationEmpty = conversation.lastMessageCreatedAt === null;
|
|
71
71
|
let t4;
|
|
72
|
-
if ($[6]
|
|
73
|
-
t4 = ()
|
|
72
|
+
if ($[6] !== conversation) {
|
|
73
|
+
t4 = isArchivedConversation(conversation);
|
|
74
|
+
$[6] = conversation;
|
|
75
|
+
$[7] = t4;
|
|
76
|
+
} else {
|
|
77
|
+
t4 = $[7];
|
|
78
|
+
}
|
|
79
|
+
const canMute = !t4;
|
|
80
|
+
let t5;
|
|
81
|
+
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
82
|
+
t5 = () => {
|
|
74
83
|
setDisabled(false);
|
|
75
84
|
swipeableRef.current?.close();
|
|
76
85
|
};
|
|
77
|
-
$[
|
|
86
|
+
$[8] = t5;
|
|
78
87
|
} else {
|
|
79
|
-
|
|
88
|
+
t5 = $[8];
|
|
80
89
|
}
|
|
81
|
-
const handleSwipeableClose =
|
|
82
|
-
let
|
|
83
|
-
if ($[
|
|
84
|
-
|
|
90
|
+
const handleSwipeableClose = t5;
|
|
91
|
+
let t6;
|
|
92
|
+
if ($[9] !== conversation.id || $[10] !== setActiveConversationId) {
|
|
93
|
+
t6 = () => {
|
|
85
94
|
setDisabled(true);
|
|
86
95
|
setActiveConversationId(conversation.id);
|
|
87
96
|
};
|
|
88
|
-
$[
|
|
89
|
-
$[
|
|
90
|
-
$[
|
|
97
|
+
$[9] = conversation.id;
|
|
98
|
+
$[10] = setActiveConversationId;
|
|
99
|
+
$[11] = t6;
|
|
91
100
|
} else {
|
|
92
|
-
|
|
101
|
+
t6 = $[11];
|
|
93
102
|
}
|
|
94
|
-
const handleSwipeableOpen =
|
|
95
|
-
let
|
|
96
|
-
if ($[
|
|
97
|
-
|
|
103
|
+
const handleSwipeableOpen = t6;
|
|
104
|
+
let t7;
|
|
105
|
+
if ($[12] !== disabled || $[13] !== onPress) {
|
|
106
|
+
t7 = () => {
|
|
98
107
|
if (disabled || !onPress) {
|
|
99
108
|
return;
|
|
100
109
|
}
|
|
101
110
|
onPress();
|
|
102
111
|
};
|
|
103
|
-
$[
|
|
104
|
-
$[
|
|
105
|
-
$[
|
|
112
|
+
$[12] = disabled;
|
|
113
|
+
$[13] = onPress;
|
|
114
|
+
$[14] = t7;
|
|
106
115
|
} else {
|
|
107
|
-
|
|
116
|
+
t7 = $[14];
|
|
108
117
|
}
|
|
109
|
-
const handlePress =
|
|
110
|
-
let
|
|
111
|
-
if ($[
|
|
112
|
-
|
|
118
|
+
const handlePress = t7;
|
|
119
|
+
let t8;
|
|
120
|
+
if ($[15] !== muted || $[16] !== setMuted) {
|
|
121
|
+
t8 = () => {
|
|
113
122
|
setMuted(!muted);
|
|
114
123
|
handleSwipeableClose();
|
|
115
124
|
};
|
|
116
|
-
$[
|
|
117
|
-
$[
|
|
118
|
-
$[
|
|
125
|
+
$[15] = muted;
|
|
126
|
+
$[16] = setMuted;
|
|
127
|
+
$[17] = t8;
|
|
119
128
|
} else {
|
|
120
|
-
|
|
129
|
+
t8 = $[17];
|
|
121
130
|
}
|
|
122
|
-
const handleMute =
|
|
123
|
-
let
|
|
124
|
-
if ($[
|
|
125
|
-
|
|
131
|
+
const handleMute = t8;
|
|
132
|
+
let t9;
|
|
133
|
+
if ($[18] !== markRead || $[19] !== read) {
|
|
134
|
+
t9 = () => {
|
|
126
135
|
markRead(!read);
|
|
127
136
|
handleSwipeableClose();
|
|
128
137
|
};
|
|
129
|
-
$[
|
|
130
|
-
$[
|
|
131
|
-
$[
|
|
138
|
+
$[18] = markRead;
|
|
139
|
+
$[19] = read;
|
|
140
|
+
$[20] = t9;
|
|
132
141
|
} else {
|
|
133
|
-
|
|
142
|
+
t9 = $[20];
|
|
134
143
|
}
|
|
135
|
-
const handleLatestMessageUnread =
|
|
136
|
-
let
|
|
137
|
-
if ($[
|
|
138
|
-
|
|
144
|
+
const handleLatestMessageUnread = t9;
|
|
145
|
+
let t10;
|
|
146
|
+
if ($[21] !== isConversationEmpty || $[22] !== read) {
|
|
147
|
+
t10 = !isConversationEmpty ? [{
|
|
139
148
|
name: read ? "markUnread" : "markRead",
|
|
140
149
|
label: read ? "Mark unread" : "Mark read"
|
|
141
150
|
}] : [];
|
|
142
|
-
$[
|
|
143
|
-
$[
|
|
144
|
-
$[
|
|
151
|
+
$[21] = isConversationEmpty;
|
|
152
|
+
$[22] = read;
|
|
153
|
+
$[23] = t10;
|
|
145
154
|
} else {
|
|
146
|
-
|
|
155
|
+
t10 = $[23];
|
|
147
156
|
}
|
|
148
|
-
const readAccessibilityAction =
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
$[
|
|
158
|
-
$[23] = t11;
|
|
159
|
-
$[24] = t12;
|
|
157
|
+
const readAccessibilityAction = t10;
|
|
158
|
+
let t11;
|
|
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;
|
|
166
|
+
$[26] = t11;
|
|
160
167
|
} else {
|
|
161
|
-
|
|
168
|
+
t11 = $[26];
|
|
162
169
|
}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
$[
|
|
168
|
-
$[
|
|
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;
|
|
169
177
|
} else {
|
|
170
|
-
|
|
178
|
+
t12 = $[29];
|
|
171
179
|
}
|
|
172
|
-
const accessibilityActions =
|
|
173
|
-
let
|
|
174
|
-
if ($[
|
|
175
|
-
|
|
176
|
-
|
|
180
|
+
const accessibilityActions = t12;
|
|
181
|
+
let t13;
|
|
182
|
+
if ($[30] !== handleLatestMessageUnread || $[31] !== handleMute) {
|
|
183
|
+
t13 = event => {
|
|
184
|
+
bb45: switch (event.nativeEvent.actionName) {
|
|
177
185
|
case "markRead":
|
|
178
186
|
{
|
|
179
187
|
handleLatestMessageUnread();
|
|
180
|
-
break
|
|
188
|
+
break bb45;
|
|
181
189
|
}
|
|
182
190
|
case "markUnread":
|
|
183
191
|
{
|
|
184
192
|
handleLatestMessageUnread();
|
|
185
|
-
break
|
|
193
|
+
break bb45;
|
|
186
194
|
}
|
|
187
195
|
case "mute":
|
|
188
196
|
{
|
|
189
197
|
handleMute();
|
|
190
|
-
break
|
|
198
|
+
break bb45;
|
|
191
199
|
}
|
|
192
200
|
case "unmute":
|
|
193
201
|
{
|
|
@@ -195,43 +203,44 @@ export function ConversationActions(t0) {
|
|
|
195
203
|
}
|
|
196
204
|
}
|
|
197
205
|
};
|
|
198
|
-
$[
|
|
199
|
-
$[
|
|
200
|
-
$[
|
|
206
|
+
$[30] = handleLatestMessageUnread;
|
|
207
|
+
$[31] = handleMute;
|
|
208
|
+
$[32] = t13;
|
|
201
209
|
} else {
|
|
202
|
-
|
|
210
|
+
t13 = $[32];
|
|
203
211
|
}
|
|
204
|
-
const handleAccessibilityAction =
|
|
212
|
+
const handleAccessibilityAction = t13;
|
|
213
|
+
let t14;
|
|
205
214
|
let t15;
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
t15 = () => {
|
|
215
|
+
if ($[33] !== activeConversationId || $[34] !== conversation.id) {
|
|
216
|
+
t14 = () => {
|
|
209
217
|
if (activeConversationId === conversation.id) {
|
|
210
218
|
return;
|
|
211
219
|
}
|
|
212
220
|
handleSwipeableClose();
|
|
213
221
|
};
|
|
214
|
-
|
|
215
|
-
$[
|
|
216
|
-
$[
|
|
217
|
-
$[
|
|
218
|
-
$[
|
|
222
|
+
t15 = [activeConversationId, conversation.id, handleSwipeableClose];
|
|
223
|
+
$[33] = activeConversationId;
|
|
224
|
+
$[34] = conversation.id;
|
|
225
|
+
$[35] = t14;
|
|
226
|
+
$[36] = t15;
|
|
219
227
|
} else {
|
|
220
|
-
|
|
221
|
-
|
|
228
|
+
t14 = $[35];
|
|
229
|
+
t15 = $[36];
|
|
222
230
|
}
|
|
223
|
-
useEffect(
|
|
224
|
-
let
|
|
225
|
-
if ($[
|
|
226
|
-
|
|
227
|
-
$[
|
|
231
|
+
useEffect(t14, t15);
|
|
232
|
+
let t16;
|
|
233
|
+
if ($[37] === Symbol.for("react.memo_cache_sentinel")) {
|
|
234
|
+
t16 = () => setDisabled(false);
|
|
235
|
+
$[37] = t16;
|
|
228
236
|
} else {
|
|
229
|
-
|
|
237
|
+
t16 = $[37];
|
|
230
238
|
}
|
|
231
|
-
let
|
|
232
|
-
if ($[
|
|
233
|
-
|
|
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, {
|
|
234
242
|
isConversationEmpty: isConversationEmpty,
|
|
243
|
+
canMute: canMute,
|
|
235
244
|
handleMute: handleMute,
|
|
236
245
|
handleLatestMessageUnread: handleLatestMessageUnread,
|
|
237
246
|
muted: muted,
|
|
@@ -239,71 +248,72 @@ export function ConversationActions(t0) {
|
|
|
239
248
|
isMutedPending: isMutedPending,
|
|
240
249
|
isMarkReadPending: isMarkReadPending
|
|
241
250
|
});
|
|
242
|
-
$[
|
|
243
|
-
$[
|
|
244
|
-
$[
|
|
245
|
-
$[
|
|
246
|
-
$[
|
|
247
|
-
$[
|
|
248
|
-
$[
|
|
249
|
-
$[
|
|
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;
|
|
250
260
|
} else {
|
|
251
|
-
|
|
261
|
+
t17 = $[46];
|
|
252
262
|
}
|
|
253
|
-
const
|
|
254
|
-
let
|
|
255
|
-
if ($[
|
|
256
|
-
|
|
263
|
+
const t18 = `conversation-${conversation.id}`;
|
|
264
|
+
let t19;
|
|
265
|
+
if ($[47] !== style) {
|
|
266
|
+
t19 = t20 => {
|
|
257
267
|
const {
|
|
258
268
|
pressed
|
|
259
|
-
} =
|
|
269
|
+
} = t20;
|
|
260
270
|
return [style, pressed && platformPressedOpacityStyle];
|
|
261
271
|
};
|
|
262
|
-
$[
|
|
263
|
-
$[
|
|
272
|
+
$[47] = style;
|
|
273
|
+
$[48] = t19;
|
|
264
274
|
} else {
|
|
265
|
-
|
|
275
|
+
t19 = $[48];
|
|
266
276
|
}
|
|
267
|
-
let
|
|
268
|
-
if ($[
|
|
269
|
-
|
|
277
|
+
let t20;
|
|
278
|
+
if ($[49] !== androidRippleColor) {
|
|
279
|
+
t20 = {
|
|
270
280
|
color: androidRippleColor,
|
|
271
281
|
borderless: false,
|
|
272
282
|
foreground: true
|
|
273
283
|
};
|
|
274
|
-
$[
|
|
275
|
-
$[
|
|
284
|
+
$[49] = androidRippleColor;
|
|
285
|
+
$[50] = t20;
|
|
276
286
|
} else {
|
|
277
|
-
|
|
287
|
+
t20 = $[50];
|
|
278
288
|
}
|
|
279
|
-
let
|
|
280
|
-
if ($[
|
|
281
|
-
|
|
282
|
-
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,
|
|
283
293
|
onPress: handlePress,
|
|
284
|
-
style:
|
|
285
|
-
android_ripple:
|
|
294
|
+
style: t19,
|
|
295
|
+
android_ripple: t20,
|
|
286
296
|
accessibilityLabel: accessibilityLabel,
|
|
287
297
|
accessibilityRole: "button",
|
|
288
298
|
accessibilityActions: accessibilityActions,
|
|
289
299
|
onAccessibilityAction: handleAccessibilityAction,
|
|
290
300
|
children: children
|
|
291
301
|
});
|
|
292
|
-
$[
|
|
293
|
-
$[
|
|
294
|
-
$[
|
|
295
|
-
$[
|
|
296
|
-
$[
|
|
297
|
-
$[
|
|
298
|
-
$[
|
|
299
|
-
$[
|
|
300
|
-
$[
|
|
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;
|
|
301
311
|
} else {
|
|
302
|
-
|
|
312
|
+
t21 = $[59];
|
|
303
313
|
}
|
|
304
|
-
let
|
|
305
|
-
if ($[
|
|
306
|
-
|
|
314
|
+
let t22;
|
|
315
|
+
if ($[60] !== handleSwipeableOpen || $[61] !== styles.swipeableChildContainer || $[62] !== styles.swipeableContainer || $[63] !== t17 || $[64] !== t21) {
|
|
316
|
+
t22 = /*#__PURE__*/_jsx(ReanimatedSwipeable, {
|
|
307
317
|
ref: swipeableRef,
|
|
308
318
|
childrenContainerStyle: styles.swipeableChildContainer,
|
|
309
319
|
containerStyle: styles.swipeableContainer,
|
|
@@ -311,29 +321,30 @@ export function ConversationActions(t0) {
|
|
|
311
321
|
overshootLeft: overshootLeft,
|
|
312
322
|
overshootRight: false,
|
|
313
323
|
onSwipeableOpenStartDrag: handleSwipeableOpen,
|
|
314
|
-
onSwipeableClose:
|
|
324
|
+
onSwipeableClose: t16,
|
|
315
325
|
renderRightActions: _temp,
|
|
316
|
-
renderLeftActions:
|
|
317
|
-
children:
|
|
326
|
+
renderLeftActions: t17,
|
|
327
|
+
children: t21
|
|
318
328
|
});
|
|
319
|
-
$[
|
|
320
|
-
$[
|
|
321
|
-
$[
|
|
322
|
-
$[
|
|
323
|
-
$[
|
|
324
|
-
$[
|
|
329
|
+
$[60] = handleSwipeableOpen;
|
|
330
|
+
$[61] = styles.swipeableChildContainer;
|
|
331
|
+
$[62] = styles.swipeableContainer;
|
|
332
|
+
$[63] = t17;
|
|
333
|
+
$[64] = t21;
|
|
334
|
+
$[65] = t22;
|
|
325
335
|
} else {
|
|
326
|
-
|
|
336
|
+
t22 = $[65];
|
|
327
337
|
}
|
|
328
|
-
return
|
|
338
|
+
return t22;
|
|
329
339
|
}
|
|
330
340
|
function _temp() {
|
|
331
341
|
return /*#__PURE__*/_jsx(_Fragment, {});
|
|
332
342
|
}
|
|
333
343
|
function LeftActions(t0) {
|
|
334
|
-
const $ = _c(
|
|
344
|
+
const $ = _c(18);
|
|
335
345
|
const {
|
|
336
346
|
isConversationEmpty,
|
|
347
|
+
canMute,
|
|
337
348
|
handleMute,
|
|
338
349
|
handleLatestMessageUnread,
|
|
339
350
|
muted,
|
|
@@ -341,10 +352,21 @@ function LeftActions(t0) {
|
|
|
341
352
|
isMutedPending,
|
|
342
353
|
isMarkReadPending
|
|
343
354
|
} = t0;
|
|
344
|
-
const
|
|
345
|
-
let
|
|
346
|
-
if ($[0]
|
|
347
|
-
|
|
355
|
+
const t1 = canMute ? 2 : 1;
|
|
356
|
+
let t2;
|
|
357
|
+
if ($[0] !== t1) {
|
|
358
|
+
t2 = {
|
|
359
|
+
actionButtonCount: t1
|
|
360
|
+
};
|
|
361
|
+
$[0] = t1;
|
|
362
|
+
$[1] = t2;
|
|
363
|
+
} else {
|
|
364
|
+
t2 = $[1];
|
|
365
|
+
}
|
|
366
|
+
const styles = useStyles(t2);
|
|
367
|
+
let t3;
|
|
368
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
369
|
+
t3 = {
|
|
348
370
|
true: {
|
|
349
371
|
iconName: "general.bell",
|
|
350
372
|
label: "Enable"
|
|
@@ -354,14 +376,14 @@ function LeftActions(t0) {
|
|
|
354
376
|
label: "Silence"
|
|
355
377
|
}
|
|
356
378
|
};
|
|
357
|
-
$[
|
|
379
|
+
$[2] = t3;
|
|
358
380
|
} else {
|
|
359
|
-
|
|
381
|
+
t3 = $[2];
|
|
360
382
|
}
|
|
361
|
-
const muteToggleContent =
|
|
362
|
-
let
|
|
363
|
-
if ($[
|
|
364
|
-
|
|
383
|
+
const muteToggleContent = t3;
|
|
384
|
+
let t4;
|
|
385
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
386
|
+
t4 = {
|
|
365
387
|
true: {
|
|
366
388
|
iconName: "general.outlinedTextMessage",
|
|
367
389
|
label: "Mark read"
|
|
@@ -371,90 +393,103 @@ function LeftActions(t0) {
|
|
|
371
393
|
label: "Mark unread"
|
|
372
394
|
}
|
|
373
395
|
};
|
|
374
|
-
$[
|
|
396
|
+
$[3] = t4;
|
|
375
397
|
} else {
|
|
376
|
-
|
|
398
|
+
t4 = $[3];
|
|
377
399
|
}
|
|
378
|
-
const latestMessageUnreadToggleContent =
|
|
379
|
-
const
|
|
380
|
-
let
|
|
381
|
-
if ($[
|
|
382
|
-
|
|
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, {
|
|
383
405
|
loading: isMarkReadPending,
|
|
384
406
|
disabled: isConversationEmpty,
|
|
385
|
-
toggled:
|
|
407
|
+
toggled: t5,
|
|
386
408
|
onPress: handleLatestMessageUnread,
|
|
387
409
|
toggleContent: latestMessageUnreadToggleContent,
|
|
388
410
|
backgroundColor: tokens.fillColorInteractionSwipeDefault
|
|
389
411
|
});
|
|
390
|
-
$[
|
|
391
|
-
$[
|
|
392
|
-
$[
|
|
393
|
-
$[
|
|
394
|
-
$[
|
|
412
|
+
$[4] = handleLatestMessageUnread;
|
|
413
|
+
$[5] = isConversationEmpty;
|
|
414
|
+
$[6] = isMarkReadPending;
|
|
415
|
+
$[7] = t5;
|
|
416
|
+
$[8] = t6;
|
|
395
417
|
} else {
|
|
396
|
-
|
|
418
|
+
t6 = $[8];
|
|
397
419
|
}
|
|
398
|
-
let
|
|
399
|
-
if ($[
|
|
400
|
-
|
|
420
|
+
let t7;
|
|
421
|
+
if ($[9] !== canMute || $[10] !== handleMute || $[11] !== isMutedPending || $[12] !== muted) {
|
|
422
|
+
t7 = canMute && /*#__PURE__*/_jsx(SwipeableToggleButton, {
|
|
401
423
|
loading: isMutedPending,
|
|
402
424
|
toggled: muted,
|
|
403
425
|
onPress: handleMute,
|
|
404
426
|
toggleContent: muteToggleContent,
|
|
405
427
|
backgroundColor: tokens.fillColorInteractionSwipeSecondary
|
|
406
428
|
});
|
|
407
|
-
$[
|
|
408
|
-
$[
|
|
409
|
-
$[
|
|
410
|
-
$[
|
|
429
|
+
$[9] = canMute;
|
|
430
|
+
$[10] = handleMute;
|
|
431
|
+
$[11] = isMutedPending;
|
|
432
|
+
$[12] = muted;
|
|
433
|
+
$[13] = t7;
|
|
411
434
|
} else {
|
|
412
|
-
|
|
435
|
+
t7 = $[13];
|
|
413
436
|
}
|
|
414
|
-
let
|
|
415
|
-
if ($[
|
|
416
|
-
|
|
437
|
+
let t8;
|
|
438
|
+
if ($[14] !== styles.actionButtonContainer || $[15] !== t6 || $[16] !== t7) {
|
|
439
|
+
t8 = /*#__PURE__*/_jsxs(View, {
|
|
417
440
|
style: styles.actionButtonContainer,
|
|
418
|
-
children: [
|
|
441
|
+
children: [t6, t7]
|
|
419
442
|
});
|
|
420
|
-
$[
|
|
421
|
-
$[
|
|
422
|
-
$[
|
|
423
|
-
$[
|
|
443
|
+
$[14] = styles.actionButtonContainer;
|
|
444
|
+
$[15] = t6;
|
|
445
|
+
$[16] = t7;
|
|
446
|
+
$[17] = t8;
|
|
424
447
|
} else {
|
|
425
|
-
|
|
448
|
+
t8 = $[17];
|
|
426
449
|
}
|
|
427
|
-
return
|
|
450
|
+
return t8;
|
|
428
451
|
}
|
|
429
452
|
const ACTION_BUTTON_WIDTH = 120;
|
|
430
|
-
const
|
|
431
|
-
const
|
|
432
|
-
|
|
453
|
+
const useStyles = t0 => {
|
|
454
|
+
const $ = _c(6);
|
|
455
|
+
let t1;
|
|
456
|
+
if ($[0] !== t0) {
|
|
457
|
+
t1 = t0 === undefined ? {} : t0;
|
|
458
|
+
$[0] = t0;
|
|
459
|
+
$[1] = t1;
|
|
460
|
+
} else {
|
|
461
|
+
t1 = $[1];
|
|
462
|
+
}
|
|
463
|
+
const {
|
|
464
|
+
actionButtonCount: t2
|
|
465
|
+
} = t1;
|
|
466
|
+
const actionButtonCount = t2 === undefined ? 2 : t2;
|
|
433
467
|
const {
|
|
434
468
|
colors
|
|
435
469
|
} = useTheme();
|
|
436
|
-
let
|
|
437
|
-
if ($[
|
|
438
|
-
|
|
470
|
+
let t3;
|
|
471
|
+
if ($[2] !== actionButtonCount || $[3] !== colors.conversationActionsBackground || $[4] !== colors.surfaceColor090) {
|
|
472
|
+
t3 = StyleSheet.create({
|
|
439
473
|
swipeableChildContainer: {
|
|
440
474
|
backgroundColor: colors.conversationActionsBackground
|
|
441
475
|
},
|
|
442
476
|
actionButtonContainer: {
|
|
443
477
|
flexDirection: "row",
|
|
444
478
|
alignItems: "center",
|
|
445
|
-
width: ACTION_BUTTON_WIDTH *
|
|
479
|
+
width: ACTION_BUTTON_WIDTH * actionButtonCount,
|
|
446
480
|
alignContent: "stretch"
|
|
447
481
|
},
|
|
448
482
|
swipeableContainer: {
|
|
449
483
|
backgroundColor: colors.surfaceColor090
|
|
450
484
|
}
|
|
451
485
|
});
|
|
452
|
-
$[
|
|
453
|
-
$[
|
|
454
|
-
$[
|
|
486
|
+
$[2] = actionButtonCount;
|
|
487
|
+
$[3] = colors.conversationActionsBackground;
|
|
488
|
+
$[4] = colors.surfaceColor090;
|
|
489
|
+
$[5] = t3;
|
|
455
490
|
} else {
|
|
456
|
-
|
|
491
|
+
t3 = $[5];
|
|
457
492
|
}
|
|
458
|
-
return
|
|
493
|
+
return t3;
|
|
459
494
|
};
|
|
460
495
|
//# sourceMappingURL=conversation_actions.js.map
|