@cometchat/chat-uikit-react-native 4.3.21 → 4.3.22-t1
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/package.json +1 -1
- package/src/AI/AIConversationSummary/AIConversationSummaryView.tsx +171 -167
- package/src/AI/CardView.tsx +55 -53
- package/src/CometChatCreateGroup/CometChatCreateGroup.tsx +8 -13
- package/src/CometChatGroups/CometChatGroups.tsx +545 -514
- package/src/CometChatJoinProtectedGroup/CometChatJoinProtectedGroup.tsx +5 -8
- package/src/CometChatMessageComposer/CometChatMessageComposer.tsx +544 -378
- package/src/CometChatMessageHeader/CometChatMessageHeader.tsx +103 -78
- package/src/CometChatThreadedMessages/CometChatThreadedMessages.tsx +3 -8
- package/src/CometChatTransferOwnership/CometChatTransferOwnership.tsx +11 -13
- package/src/CometChatUsers/CometChatUsers.tsx +24 -23
- package/src/extensions/CollaborativeBubble/CometChatCollaborativeBubble.tsx +24 -25
- package/src/extensions/Polls/Polls.tsx +8 -16
- package/src/extensions/Polls/PollsBubble.tsx +5 -10
- package/src/extensions/SmartReplies/SmartRepliesView.tsx +16 -22
- package/src/extensions/Stickers/CometChatStickerKeyboard/CometChatStickerKeyboard.tsx +51 -51
- package/src/shared/libs/datePickerModal/DateTimePickerModal.android.js +1 -7
- package/src/shared/utils/CometChatMessagePreview/CometChatMessagePreview.js +38 -46
- package/src/shared/views/CometChatActionSheet/CometChatActionSheet.tsx +19 -19
- package/src/shared/views/CometChatAvatar/CometChatAvatar.tsx +8 -20
- package/src/shared/views/CometChatBadge/CometChatBadge.tsx +8 -14
- package/src/shared/views/CometChatBottomSheet/CometChatBottomSheet.tsx +141 -140
- package/src/shared/views/CometChatConfirmDialog/CometChatConfirmDialog.tsx +47 -51
- package/src/shared/views/CometChatDate/CometChatDate.tsx +18 -17
- package/src/shared/views/CometChatDateTimePicker/CometChatDateTimePicker.tsx +65 -51
- package/src/shared/views/CometChatEmojiKeyboard/CometChatEmojiKeyboard.tsx +76 -72
- package/src/shared/views/CometChatFormBubble/CometChatFormBubble.tsx +3 -8
- package/src/shared/views/CometChatList/CometChatList.tsx +133 -134
- package/src/shared/views/CometChatListItem/CometChatListItem.tsx +65 -64
- package/src/shared/views/CometChatMediaRecorder/CometChatMediaRecorder.tsx +2 -6
- package/src/shared/views/CometChatMessageBubble/CometChatMessageBubble.tsx +3 -8
- package/src/shared/views/CometChatMessageInput/CometChatMessageInput.tsx +24 -23
- package/src/shared/views/CometChatReactions/CometChatReactions.tsx +107 -53
- package/src/shared/views/CometChatReceipt/CometChatReceipt.tsx +22 -14
- package/src/shared/views/CometChatStatusIndicator/CometChatStatusIndicator.tsx +15 -8
- package/src/shared/views/CometChatTextBubble/CometChatTextBubble.tsx +2 -6
- package/src/shared/views/SwipeRow/SwipeRow.tsx +6 -14
|
@@ -1,199 +1,209 @@
|
|
|
1
1
|
//@ts-ignore
|
|
2
|
-
import React, { useState, useRef } from
|
|
2
|
+
import React, { useState, useRef } from 'react';
|
|
3
3
|
//@ts-ignore
|
|
4
|
-
import { Text, TextStyle, View, ViewProps } from
|
|
4
|
+
import { Text, TextStyle, View, ViewProps } from 'react-native';
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
backIcon,
|
|
7
|
+
passwordGroupIcon as passwordGroupIconDefault,
|
|
8
|
+
privateGroupIcon as privateGroupIconDefault,
|
|
9
|
+
checkIcon,
|
|
10
|
+
} from './resources';
|
|
10
11
|
//@ts-ignore
|
|
11
|
-
import { CometChat } from
|
|
12
|
-
import { GroupsStyle, GroupsStyleInterface } from
|
|
13
|
-
import { Style } from
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
12
|
+
import { CometChat } from '@cometchat/chat-sdk-react-native';
|
|
13
|
+
import { GroupsStyle, GroupsStyleInterface } from './GroupsStyle';
|
|
14
|
+
import { Style } from './style';
|
|
15
|
+
import {
|
|
16
|
+
CometChatContext,
|
|
17
|
+
CometChatListActionsInterface,
|
|
18
|
+
ListItemStyleInterface,
|
|
19
|
+
localize,
|
|
20
|
+
} from '../shared';
|
|
21
|
+
import { BorderStyle, ImageType } from '../shared';
|
|
22
|
+
import {
|
|
23
|
+
GroupTypeConstants,
|
|
24
|
+
PASSWORD_GROUP_COLOR,
|
|
25
|
+
PRIVATE_GROUP_COLOR,
|
|
26
|
+
} from '../shared/constants/UIKitConstants';
|
|
27
|
+
import { CometChatListItem, ListItemStyle } from '../shared';
|
|
28
|
+
import { AvatarStyle, StatusIndicatorStyle } from '../shared';
|
|
29
|
+
import { CometChatList } from '../shared';
|
|
30
|
+
import { CometChatContextType, SelectionMode } from '../shared/base/Types';
|
|
31
|
+
import { CometChatOptions } from '../shared/modals/CometChatOptions';
|
|
32
|
+
import { AvatarStyleInterface } from '../shared/views/CometChatAvatar/AvatarStyle';
|
|
33
|
+
import { StatusIndicatorStyleInterface } from '../shared/views/CometChatStatusIndicator/StatusIndicatorStyle';
|
|
34
|
+
import { CometChatUIEventHandler } from '../shared/events/CometChatUIEventHandler/CometChatUIEventHandler';
|
|
35
|
+
|
|
36
|
+
const uiEventListener = 'uiEvents_' + new Date().getTime();
|
|
27
37
|
|
|
28
38
|
export interface CometChatGroupsInterface {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
39
|
+
/**
|
|
40
|
+
* Custom subtitle view
|
|
41
|
+
*/
|
|
42
|
+
SubtitleView?: (item: CometChat.Group) => JSX.Element;
|
|
43
|
+
/**
|
|
44
|
+
* Custom list item view
|
|
45
|
+
*/
|
|
46
|
+
ListItemView?: (item: CometChat.Group) => JSX.Element;
|
|
47
|
+
/**
|
|
48
|
+
* pass compoent for menu, will be shown at top right side
|
|
49
|
+
*/
|
|
50
|
+
AppBarOption?: () => JSX.Element;
|
|
51
|
+
/**
|
|
52
|
+
* Pass array of CometChatOptions type
|
|
53
|
+
* Tobe shown on swipe of list item
|
|
54
|
+
*/
|
|
55
|
+
options?: (item: CometChat.Group) => CometChatOptions[];
|
|
56
|
+
/**
|
|
57
|
+
* toggle the seperator
|
|
58
|
+
*/
|
|
59
|
+
hideSeperator?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* hide selection icon
|
|
62
|
+
*/
|
|
63
|
+
hideSubmitIcon?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* styles for groups
|
|
66
|
+
*/
|
|
67
|
+
groupsStyle?: GroupsStyleInterface;
|
|
68
|
+
/**
|
|
69
|
+
* styles for list item
|
|
70
|
+
*/
|
|
71
|
+
listItemStyle?: ListItemStyleInterface;
|
|
72
|
+
/**
|
|
73
|
+
* styles for avatar
|
|
74
|
+
*/
|
|
75
|
+
avatarStyle?: AvatarStyleInterface;
|
|
76
|
+
/**
|
|
77
|
+
* styles for status indicator
|
|
78
|
+
*/
|
|
79
|
+
statusIndicatorStyle?: StatusIndicatorStyleInterface;
|
|
80
|
+
/**
|
|
81
|
+
* search placeholder text
|
|
82
|
+
*/
|
|
83
|
+
searchPlaceHolderText?: string;
|
|
84
|
+
/**
|
|
85
|
+
* back button icon
|
|
86
|
+
*/
|
|
87
|
+
backButtonIcon?: ImageType;
|
|
88
|
+
/**
|
|
89
|
+
* toggle back button
|
|
90
|
+
*/
|
|
91
|
+
showBackButton?: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* select items pass "none" | "single" | "multitple"
|
|
94
|
+
*/
|
|
95
|
+
selectionMode?: SelectionMode;
|
|
96
|
+
/**
|
|
97
|
+
* call back on seleciton is done
|
|
98
|
+
*/
|
|
99
|
+
onSelection?: (items: Array<CometChat.Group>) => void;
|
|
100
|
+
/**
|
|
101
|
+
* icon for search box
|
|
102
|
+
*/
|
|
103
|
+
searchBoxIcon?: ImageType;
|
|
104
|
+
/**
|
|
105
|
+
* toggle seearch box
|
|
106
|
+
*/
|
|
107
|
+
hideSearch?: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* title to be shown default "Groups"
|
|
110
|
+
*/
|
|
111
|
+
title?: string;
|
|
112
|
+
/**
|
|
113
|
+
* Custom Functional component for empty state
|
|
114
|
+
*/
|
|
115
|
+
EmptyStateView?: () => JSX.Element;
|
|
116
|
+
/**
|
|
117
|
+
* text to be shown in case no groups found.
|
|
118
|
+
*/
|
|
119
|
+
emptyStateText?: string;
|
|
120
|
+
/**
|
|
121
|
+
* Custom functional component for error state.
|
|
122
|
+
*/
|
|
123
|
+
ErrorStateView?: () => JSX.Element;
|
|
124
|
+
/**
|
|
125
|
+
* text to be shown in case error occured while fetching gounps for first time
|
|
126
|
+
*/
|
|
127
|
+
errorStateText?: string;
|
|
128
|
+
/**
|
|
129
|
+
* Custom image for loading state.
|
|
130
|
+
*/
|
|
131
|
+
LoadingStateView?: () => JSX.Element;
|
|
132
|
+
/**
|
|
133
|
+
* Request builder to fetch groups.
|
|
134
|
+
*/
|
|
135
|
+
groupsRequestBuilder?: CometChat.GroupsRequestBuilder;
|
|
136
|
+
/**
|
|
137
|
+
* request builder for search
|
|
138
|
+
*/
|
|
139
|
+
searchRequestBuilder?: CometChat.GroupsRequestBuilder;
|
|
140
|
+
/**
|
|
141
|
+
* pass icon for private group
|
|
142
|
+
*/
|
|
143
|
+
privateGroupIcon?: ImageType;
|
|
144
|
+
/**
|
|
145
|
+
* pass icon for password group
|
|
146
|
+
*/
|
|
147
|
+
passwordGroupIcon?: ImageType;
|
|
148
|
+
/**
|
|
149
|
+
* toogle error visibility
|
|
150
|
+
*/
|
|
151
|
+
hideError?: boolean;
|
|
152
|
+
/**
|
|
153
|
+
* function tobe called on group pressed.
|
|
154
|
+
*/
|
|
155
|
+
onItemPress?: (item: CometChat.Group) => void;
|
|
156
|
+
/**
|
|
157
|
+
* function tobe called on group long pressed.
|
|
158
|
+
*/
|
|
159
|
+
onItemLongPress?: (item: CometChat.Group) => void;
|
|
160
|
+
/**
|
|
161
|
+
* function will be called when error occured.
|
|
162
|
+
*/
|
|
163
|
+
onError?: (e: CometChat.CometChatException) => void;
|
|
164
|
+
/**
|
|
165
|
+
* function will be called when back button pressed.
|
|
166
|
+
*/
|
|
167
|
+
onBack?: () => void;
|
|
158
168
|
}
|
|
159
169
|
|
|
160
|
-
const groupListenerId =
|
|
161
|
-
|
|
162
|
-
export const CometChatGroups = React.forwardRef((props: CometChatGroupsInterface, ref: any) => {
|
|
170
|
+
const groupListenerId = 'grouplist_' + new Date().getTime();
|
|
163
171
|
|
|
172
|
+
export const CometChatGroups = React.forwardRef(
|
|
173
|
+
(props: CometChatGroupsInterface, ref: any) => {
|
|
164
174
|
const {
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
175
|
+
SubtitleView,
|
|
176
|
+
ListItemView,
|
|
177
|
+
AppBarOption,
|
|
178
|
+
options,
|
|
179
|
+
hideSubmitIcon,
|
|
180
|
+
groupsStyle,
|
|
181
|
+
listItemStyle,
|
|
182
|
+
avatarStyle,
|
|
183
|
+
statusIndicatorStyle,
|
|
184
|
+
onSelection,
|
|
185
|
+
searchBoxIcon,
|
|
186
|
+
EmptyStateView,
|
|
187
|
+
emptyStateText,
|
|
188
|
+
ErrorStateView,
|
|
189
|
+
errorStateText,
|
|
190
|
+
LoadingStateView,
|
|
191
|
+
groupsRequestBuilder,
|
|
192
|
+
searchRequestBuilder,
|
|
193
|
+
onItemPress,
|
|
194
|
+
onItemLongPress,
|
|
195
|
+
onError,
|
|
196
|
+
onBack,
|
|
197
|
+
title = localize('GROUPS'),
|
|
198
|
+
searchPlaceHolderText = localize('SEARCH'),
|
|
199
|
+
showBackButton = false,
|
|
200
|
+
hideSearch = false,
|
|
201
|
+
hideSeperator = false,
|
|
202
|
+
backButtonIcon = backIcon,
|
|
203
|
+
selectionMode = 'none',
|
|
204
|
+
privateGroupIcon = privateGroupIconDefault,
|
|
205
|
+
passwordGroupIcon = passwordGroupIconDefault,
|
|
206
|
+
hideError = false,
|
|
197
207
|
} = props;
|
|
198
208
|
|
|
199
209
|
//context values
|
|
@@ -202,45 +212,49 @@ export const CometChatGroups = React.forwardRef((props: CometChatGroupsInterface
|
|
|
202
212
|
const groupListRef = useRef<CometChatListActionsInterface | null>(null);
|
|
203
213
|
const activeSwipeRows = React.useRef<any>({});
|
|
204
214
|
|
|
205
|
-
const [selecting, setSelecting] = useState(
|
|
215
|
+
const [selecting, setSelecting] = useState(
|
|
216
|
+
selectionMode != 'none' ? true : false
|
|
217
|
+
);
|
|
206
218
|
const [selectedGroups, setSelectedGroups] = useState<any[]>([]);
|
|
207
219
|
|
|
208
220
|
const _groupsStyle = new GroupsStyle({
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
221
|
+
backgroundColor: theme?.palette.getBackgroundColor(),
|
|
222
|
+
backIconTint: theme?.palette.getPrimary(),
|
|
223
|
+
emptyTextColor: theme?.palette.getAccent400(),
|
|
224
|
+
emptyTextFont: theme?.typography.caption2,
|
|
225
|
+
errorTextColor: theme?.palette.getError(),
|
|
226
|
+
errorTextFont: theme?.typography.subtitle1,
|
|
227
|
+
searchBackgroundColor: theme?.palette.getAccent600(),
|
|
228
|
+
searchBorder: new BorderStyle({
|
|
229
|
+
borderColor: theme?.palette.getAccent700(),
|
|
230
|
+
...groupsStyle?.border,
|
|
231
|
+
}),
|
|
232
|
+
separatorColor: theme?.palette.getAccent100(),
|
|
233
|
+
subtitleTextColor: theme?.palette.getAccent600(),
|
|
234
|
+
subtitleTextFont: theme?.typography.text1,
|
|
235
|
+
titleColor: theme?.palette.getAccent(),
|
|
236
|
+
titleFont: theme?.typography.title1,
|
|
237
|
+
loadingIconTint: theme?.palette.getPrimary(),
|
|
238
|
+
...groupsStyle,
|
|
227
239
|
});
|
|
228
240
|
const _avatarStyle = new AvatarStyle({
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
241
|
+
backgroundColor: theme?.palette.getAccent600(),
|
|
242
|
+
nameTextColor: theme?.palette.getSecondary(),
|
|
243
|
+
nameTextFont: theme?.typography.title1,
|
|
244
|
+
...avatarStyle,
|
|
233
245
|
});
|
|
234
|
-
const _statusIndicatorStyle = new StatusIndicatorStyle(
|
|
246
|
+
const _statusIndicatorStyle = new StatusIndicatorStyle(
|
|
247
|
+
statusIndicatorStyle || {
|
|
235
248
|
borderRadius: 10,
|
|
236
249
|
height: 15,
|
|
237
250
|
width: 15,
|
|
238
|
-
|
|
251
|
+
}
|
|
252
|
+
);
|
|
239
253
|
const _listItemStyle = new ListItemStyle({
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
254
|
+
backgroundColor: theme?.palette?.getBackgroundColor(),
|
|
255
|
+
titleColor: theme?.palette.getAccent(),
|
|
256
|
+
titleFont: theme?.typography.name,
|
|
257
|
+
...listItemStyle,
|
|
244
258
|
});
|
|
245
259
|
|
|
246
260
|
// const listStyle = new CometChatListStyles({
|
|
@@ -250,51 +264,63 @@ export const CometChatGroups = React.forwardRef((props: CometChatGroupsInterface
|
|
|
250
264
|
// })
|
|
251
265
|
|
|
252
266
|
React.useImperativeHandle(ref, () => ({
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
267
|
+
addGroup: addGroup,
|
|
268
|
+
updateGroup: updateGroup,
|
|
269
|
+
removeGroup: removeGroup,
|
|
270
|
+
getSelectedItems,
|
|
257
271
|
}));
|
|
258
272
|
|
|
259
273
|
const getSelectedItems = () => {
|
|
260
|
-
|
|
261
|
-
}
|
|
274
|
+
return selectedGroups;
|
|
275
|
+
};
|
|
262
276
|
|
|
263
277
|
const ErrorView = () => {
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
278
|
+
if (hideError) return null;
|
|
279
|
+
|
|
280
|
+
if (ErrorStateView) return <ErrorStateView />;
|
|
281
|
+
else
|
|
282
|
+
return (
|
|
283
|
+
<View style={Style.listContainer}>
|
|
284
|
+
<Text
|
|
285
|
+
style={
|
|
286
|
+
{
|
|
287
|
+
..._groupsStyle.errorTextFont,
|
|
288
|
+
color: _groupsStyle.errorTextColor,
|
|
289
|
+
} as TextStyle
|
|
290
|
+
}
|
|
291
|
+
>
|
|
292
|
+
{errorStateText || localize('SOMETHING_WRONG')}
|
|
293
|
+
</Text>
|
|
294
|
+
</View>
|
|
295
|
+
);
|
|
296
|
+
};
|
|
277
297
|
|
|
278
298
|
const EmptyView = () => {
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
299
|
+
if (EmptyStateView) return <EmptyStateView />;
|
|
300
|
+
else
|
|
301
|
+
return (
|
|
302
|
+
<View style={Style.listContainer}>
|
|
303
|
+
<Text
|
|
304
|
+
style={
|
|
305
|
+
{
|
|
306
|
+
..._groupsStyle.emptyTextFont,
|
|
307
|
+
color: _groupsStyle.emptyTextColor,
|
|
308
|
+
} as TextStyle
|
|
309
|
+
}
|
|
310
|
+
>
|
|
311
|
+
{emptyStateText || localize('NO_GROUPS_FOUND')}
|
|
312
|
+
</Text>
|
|
313
|
+
</View>
|
|
314
|
+
);
|
|
315
|
+
};
|
|
290
316
|
|
|
291
317
|
/**
|
|
292
318
|
*
|
|
293
319
|
* Listener callback when a member is kicked from / has left the group
|
|
294
320
|
*/
|
|
295
321
|
const handleGroupMemberRemoval = (...options: any[]) => {
|
|
296
|
-
|
|
297
|
-
|
|
322
|
+
const group = options[3];
|
|
323
|
+
groupListRef.current?.updateList(group);
|
|
298
324
|
};
|
|
299
325
|
|
|
300
326
|
/**
|
|
@@ -302,8 +328,8 @@ export const CometChatGroups = React.forwardRef((props: CometChatGroupsInterface
|
|
|
302
328
|
* Listener callback when a member is banned from the group
|
|
303
329
|
*/
|
|
304
330
|
const handleGroupMemberBan = (...options: any[]) => {
|
|
305
|
-
|
|
306
|
-
|
|
331
|
+
const group = options[3];
|
|
332
|
+
groupListRef.current?.updateList(group);
|
|
307
333
|
};
|
|
308
334
|
|
|
309
335
|
/**
|
|
@@ -311,8 +337,8 @@ export const CometChatGroups = React.forwardRef((props: CometChatGroupsInterface
|
|
|
311
337
|
* Listener callback when a user joins/added to the group
|
|
312
338
|
*/
|
|
313
339
|
const handleGroupMemberAddition = (...options: any[]) => {
|
|
314
|
-
|
|
315
|
-
|
|
340
|
+
const group = options[3];
|
|
341
|
+
groupListRef.current?.updateList(group);
|
|
316
342
|
};
|
|
317
343
|
|
|
318
344
|
/**
|
|
@@ -320,303 +346,308 @@ export const CometChatGroups = React.forwardRef((props: CometChatGroupsInterface
|
|
|
320
346
|
* Listener callback when a group member scope is updated
|
|
321
347
|
*/
|
|
322
348
|
const handleGroupMemberScopeChange = (...options: any[]) => {
|
|
323
|
-
|
|
324
|
-
|
|
349
|
+
const group = options[4];
|
|
350
|
+
groupListRef.current?.updateList(group);
|
|
325
351
|
};
|
|
326
352
|
|
|
327
353
|
/**
|
|
328
|
-
* This will update group in the list if not found then
|
|
354
|
+
* This will update group in the list if not found then
|
|
329
355
|
* @param {object} group Group object
|
|
330
356
|
*/
|
|
331
357
|
const updateGroup = (group: any) => {
|
|
332
|
-
|
|
333
|
-
|
|
358
|
+
groupListRef.current?.updateList(
|
|
359
|
+
(grp: any) => grp['guid'] == group['guid']
|
|
360
|
+
);
|
|
361
|
+
};
|
|
334
362
|
|
|
335
363
|
/**
|
|
336
364
|
* Add the group to the group list at first position.
|
|
337
365
|
* @param {object} group group object
|
|
338
366
|
*/
|
|
339
367
|
const addGroup = (group: any) => {
|
|
340
|
-
|
|
341
|
-
|
|
368
|
+
groupListRef.current?.addItemToList(
|
|
369
|
+
(grp: any) => grp['guid'] == group['guid'],
|
|
370
|
+
0
|
|
371
|
+
);
|
|
372
|
+
};
|
|
342
373
|
|
|
343
374
|
/**
|
|
344
375
|
* removes the group from the list.
|
|
345
376
|
* @param {object} group Group object
|
|
346
377
|
*/
|
|
347
378
|
const removeGroup = (group: any) => {
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
379
|
+
groupListRef.current?.removeItemFromList(group['guid']);
|
|
380
|
+
//remove from selected items if present
|
|
381
|
+
if (selecting) {
|
|
382
|
+
let index: any = selectedGroups.find(
|
|
383
|
+
(grp) => grp['guid'] == group['guid']
|
|
384
|
+
);
|
|
385
|
+
if (index > -1) {
|
|
386
|
+
let selectedItems = [...selectedGroups];
|
|
387
|
+
selectedItems.splice(index, 1);
|
|
388
|
+
setSelectedGroups(selectedItems);
|
|
357
389
|
}
|
|
358
|
-
|
|
390
|
+
}
|
|
391
|
+
};
|
|
359
392
|
|
|
360
393
|
const groupClicked = (group: any) => {
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
return;
|
|
368
|
-
}
|
|
369
|
-
const index: number = selectedGroups.findIndex((value) => value.guid == group.guid)
|
|
370
|
-
if (index >= 0) {
|
|
371
|
-
let tmp = [...selectedGroups]
|
|
372
|
-
tmp.splice(index, 1);
|
|
373
|
-
setSelectedGroups([...tmp]);
|
|
374
|
-
} else {
|
|
375
|
-
setSelectedGroups([...selectedGroups, group]);
|
|
376
|
-
}
|
|
377
|
-
return;
|
|
394
|
+
if (selecting) {
|
|
395
|
+
if (selectionMode == 'single') {
|
|
396
|
+
if (selectedGroups.length > 0 && selectedGroups[0].guid == group.guid)
|
|
397
|
+
setSelectedGroups([]);
|
|
398
|
+
else setSelectedGroups([group]);
|
|
399
|
+
return;
|
|
378
400
|
}
|
|
379
|
-
|
|
380
|
-
|
|
401
|
+
const index: number = selectedGroups.findIndex(
|
|
402
|
+
(value) => value.guid == group.guid
|
|
403
|
+
);
|
|
404
|
+
if (index >= 0) {
|
|
405
|
+
let tmp = [...selectedGroups];
|
|
406
|
+
tmp.splice(index, 1);
|
|
407
|
+
setSelectedGroups([...tmp]);
|
|
408
|
+
} else {
|
|
409
|
+
setSelectedGroups([...selectedGroups, group]);
|
|
410
|
+
}
|
|
411
|
+
return;
|
|
412
|
+
}
|
|
413
|
+
onItemPress && onItemPress(group);
|
|
414
|
+
};
|
|
381
415
|
|
|
382
416
|
const groupLongPressed = (group: any) => {
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
}
|
|
417
|
+
if (selectionMode != 'none') {
|
|
418
|
+
setSelecting(true);
|
|
419
|
+
if (selectionMode === 'multiple')
|
|
420
|
+
setSelectedGroups([...selectedGroups, group]);
|
|
421
|
+
else setSelectedGroups([group]);
|
|
422
|
+
}
|
|
423
|
+
onItemLongPress && onItemLongPress(group);
|
|
424
|
+
};
|
|
392
425
|
|
|
393
426
|
React.useEffect(() => {
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
427
|
+
CometChat.addGroupListener(
|
|
428
|
+
groupListenerId,
|
|
429
|
+
new CometChat.GroupListener({
|
|
430
|
+
onGroupMemberScopeChanged: (
|
|
431
|
+
message: any,
|
|
432
|
+
changedUser: any,
|
|
433
|
+
newScope: any,
|
|
434
|
+
oldScope: any,
|
|
435
|
+
changedGroup: any
|
|
436
|
+
) => {
|
|
437
|
+
handleGroupMemberScopeChange(
|
|
438
|
+
message,
|
|
439
|
+
changedUser,
|
|
440
|
+
newScope,
|
|
441
|
+
oldScope,
|
|
442
|
+
changedGroup
|
|
443
|
+
);
|
|
444
|
+
},
|
|
445
|
+
onGroupMemberKicked: (
|
|
446
|
+
message: any,
|
|
447
|
+
kickedUser: any,
|
|
448
|
+
kickedBy: any,
|
|
449
|
+
kickedFrom: any
|
|
450
|
+
) => {
|
|
451
|
+
handleGroupMemberRemoval(message, kickedUser, kickedBy, kickedFrom);
|
|
452
|
+
},
|
|
453
|
+
onGroupMemberLeft: (message: any, leavingUser: any, group: any) => {
|
|
454
|
+
handleGroupMemberRemoval(message, leavingUser, null, group);
|
|
455
|
+
},
|
|
456
|
+
onGroupMemberBanned: (
|
|
457
|
+
message: any,
|
|
458
|
+
bannedUser: any,
|
|
459
|
+
bannedBy: any,
|
|
460
|
+
bannedFrom: any
|
|
461
|
+
) => {
|
|
462
|
+
handleGroupMemberBan(message, bannedUser, bannedBy, bannedFrom);
|
|
463
|
+
},
|
|
464
|
+
onMemberAddedToGroup: (
|
|
465
|
+
message: any,
|
|
466
|
+
userAdded: any,
|
|
467
|
+
userAddedBy: any,
|
|
468
|
+
userAddedIn: any
|
|
469
|
+
) => {
|
|
470
|
+
handleGroupMemberAddition(
|
|
471
|
+
message,
|
|
472
|
+
userAdded,
|
|
473
|
+
userAddedBy,
|
|
474
|
+
userAddedIn
|
|
475
|
+
);
|
|
476
|
+
},
|
|
477
|
+
onGroupMemberJoined: (
|
|
478
|
+
message: any,
|
|
479
|
+
joinedUser: any,
|
|
480
|
+
joinedGroup: any
|
|
481
|
+
) => {
|
|
482
|
+
handleGroupMemberAddition(message, joinedUser, null, joinedGroup);
|
|
483
|
+
},
|
|
484
|
+
})
|
|
485
|
+
);
|
|
486
|
+
CometChatUIEventHandler.addGroupListener(uiEventListener, {
|
|
487
|
+
ccGroupCreated: ({ group }: any) => {
|
|
488
|
+
groupListRef.current?.addItemToList(group, 0);
|
|
489
|
+
},
|
|
490
|
+
ccGroupDeleted: ({ group }: any) => {
|
|
491
|
+
groupListRef.current?.removeItemFromList(group.guid);
|
|
492
|
+
},
|
|
493
|
+
ccGroupLeft: ({ leftGroup }: any) => {
|
|
494
|
+
leftGroup['hasJoined'] = false;
|
|
495
|
+
leftGroup['membersCount'] = leftGroup['membersCount'] - 1;
|
|
496
|
+
console.log(leftGroup);
|
|
497
|
+
if (leftGroup['type'] == CometChat.GROUP_TYPE.PRIVATE) {
|
|
498
|
+
groupListRef.current?.removeItemFromList(leftGroup.getGuid());
|
|
499
|
+
} else {
|
|
500
|
+
groupListRef.current?.updateList(leftGroup);
|
|
501
|
+
}
|
|
502
|
+
},
|
|
503
|
+
ccGroupMemberKicked: ({ group }: any) => {
|
|
504
|
+
if (group['type'] == CometChat.GROUP_TYPE.PRIVATE) {
|
|
505
|
+
groupListRef.current?.removeItemFromList(group.getGuid());
|
|
506
|
+
} else {
|
|
507
|
+
group.setHasJoined(false);
|
|
508
|
+
groupListRef.current?.updateList(group);
|
|
509
|
+
}
|
|
510
|
+
},
|
|
511
|
+
ccOwnershipChanged: ({ group }: any) => {
|
|
512
|
+
groupListRef.current?.updateList(group);
|
|
513
|
+
},
|
|
514
|
+
ccGroupMemberAdded: ({
|
|
515
|
+
userAddedIn,
|
|
516
|
+
}: {
|
|
517
|
+
userAddedIn: CometChat.Group;
|
|
518
|
+
}) => {
|
|
519
|
+
groupListRef.current?.updateList(userAddedIn);
|
|
520
|
+
},
|
|
521
|
+
ccGroupMemberJoined: ({
|
|
522
|
+
joinedGroup,
|
|
523
|
+
}: {
|
|
524
|
+
joinedGroup: CometChat.Group;
|
|
525
|
+
}) => {
|
|
526
|
+
joinedGroup['membersCount'] = joinedGroup['membersCount'] + 1;
|
|
527
|
+
joinedGroup['scope'] = 'participant';
|
|
528
|
+
joinedGroup['hasJoined'] = true;
|
|
529
|
+
groupListRef.current?.updateList(joinedGroup);
|
|
530
|
+
},
|
|
531
|
+
});
|
|
532
|
+
return () => {
|
|
533
|
+
CometChat.removeGroupListener(groupListenerId);
|
|
534
|
+
CometChatUIEventHandler.removeGroupListener(uiEventListener);
|
|
535
|
+
};
|
|
499
536
|
}, []);
|
|
500
537
|
|
|
501
538
|
const GroupItemView = ({ item }: any) => {
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
539
|
+
//custom view check
|
|
540
|
+
if (ListItemView) return ListItemView(item);
|
|
541
|
+
|
|
542
|
+
const { type, name, icon, membersCount } = item;
|
|
543
|
+
let image: ImageType | undefined,
|
|
544
|
+
backgroundColor: string = 'transparent';
|
|
545
|
+
if (type == GroupTypeConstants.password) {
|
|
546
|
+
image = passwordGroupIcon || passwordGroupIcon;
|
|
547
|
+
backgroundColor = PASSWORD_GROUP_COLOR;
|
|
548
|
+
}
|
|
549
|
+
if (type == GroupTypeConstants.private) {
|
|
550
|
+
image = privateGroupIcon || privateGroupIcon;
|
|
551
|
+
backgroundColor = PRIVATE_GROUP_COLOR;
|
|
552
|
+
}
|
|
553
|
+
if (selecting) {
|
|
554
|
+
let index: number = selectedGroups.findIndex(
|
|
555
|
+
(value) => value.guid == item.guid
|
|
556
|
+
);
|
|
557
|
+
if (index >= 0) {
|
|
558
|
+
image = checkIcon;
|
|
559
|
+
backgroundColor = theme?.palette?.getBackgroundColor();
|
|
522
560
|
}
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
return (
|
|
564
|
+
<CometChatListItem
|
|
565
|
+
id={item.guid}
|
|
566
|
+
avatarName={name}
|
|
567
|
+
avatarURL={icon}
|
|
568
|
+
hideSeparator={hideSeperator}
|
|
569
|
+
SubtitleView={() =>
|
|
570
|
+
(SubtitleView && SubtitleView(item)) || (
|
|
571
|
+
<Text style={{ color: theme.palette.getAccent600() }}>
|
|
572
|
+
{membersCount} <Text>{localize('MEMBERS')}</Text>
|
|
573
|
+
</Text>
|
|
574
|
+
)
|
|
575
|
+
}
|
|
576
|
+
title={name}
|
|
577
|
+
statusIndicatorIcon={image}
|
|
578
|
+
statusIndicatorColor={backgroundColor}
|
|
579
|
+
listItemStyle={_listItemStyle}
|
|
580
|
+
avatarStyle={_avatarStyle}
|
|
581
|
+
statusIndicatorStyle={_statusIndicatorStyle as ViewProps}
|
|
582
|
+
onPress={groupClicked.bind(this, item)}
|
|
583
|
+
onLongPress={groupLongPressed.bind(this, item)}
|
|
584
|
+
options={() => (options && options(item)) || []}
|
|
585
|
+
activeSwipeRows={activeSwipeRows.current}
|
|
586
|
+
rowOpens={(id) => {
|
|
587
|
+
Object.keys(activeSwipeRows.current).forEach((key) => {
|
|
588
|
+
if (id !== key && activeSwipeRows.current[key]) {
|
|
589
|
+
activeSwipeRows.current[key]?.current?.closeRow?.();
|
|
590
|
+
delete activeSwipeRows.current[key];
|
|
591
|
+
}
|
|
592
|
+
});
|
|
593
|
+
}}
|
|
548
594
|
/>
|
|
595
|
+
);
|
|
549
596
|
};
|
|
550
597
|
|
|
551
598
|
const onSelectionClicked = () => {
|
|
552
|
-
|
|
553
|
-
|
|
599
|
+
if (!selectedGroups.length) return;
|
|
600
|
+
onSelection && onSelection(selectedGroups);
|
|
554
601
|
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
}
|
|
602
|
+
setSelecting(false);
|
|
603
|
+
setSelectedGroups([]);
|
|
604
|
+
};
|
|
558
605
|
|
|
559
606
|
return (
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
}
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
hideSeperator: false,
|
|
608
|
-
backButtonIcon: backIcon,
|
|
609
|
-
selectionMode: "none",
|
|
610
|
-
onSelection: undefined,
|
|
611
|
-
EmptyStateView: undefined,
|
|
612
|
-
emptyStateText: undefined,
|
|
613
|
-
LoadingStateView: undefined,
|
|
614
|
-
groupsRequestBuilder: undefined,
|
|
615
|
-
privateGroupIcon: privateGroupIcon,
|
|
616
|
-
passwordGroupIcon: passwordGroupIcon,
|
|
617
|
-
hideError: false,
|
|
618
|
-
onItemPress: undefined,
|
|
619
|
-
onItemLongPress: undefined,
|
|
620
|
-
onError: undefined,
|
|
621
|
-
onBack: undefined,
|
|
622
|
-
}
|
|
607
|
+
<View
|
|
608
|
+
style={[
|
|
609
|
+
Style.container,
|
|
610
|
+
{ backgroundColor: _groupsStyle.backgroundColor },
|
|
611
|
+
]}
|
|
612
|
+
>
|
|
613
|
+
<CometChatList
|
|
614
|
+
title={title}
|
|
615
|
+
LoadingStateView={LoadingStateView}
|
|
616
|
+
searchPlaceholderText={searchPlaceHolderText}
|
|
617
|
+
ref={groupListRef}
|
|
618
|
+
listItemKey="guid"
|
|
619
|
+
ListItemView={GroupItemView}
|
|
620
|
+
EmptyStateView={EmptyView}
|
|
621
|
+
ErrorStateView={ErrorView}
|
|
622
|
+
requestBuilder={
|
|
623
|
+
groupsRequestBuilder ||
|
|
624
|
+
new CometChat.GroupsRequestBuilder()
|
|
625
|
+
.setLimit(30)
|
|
626
|
+
.setSearchKeyword('')
|
|
627
|
+
}
|
|
628
|
+
searchRequestBuilder={searchRequestBuilder}
|
|
629
|
+
AppBarOptions={AppBarOption}
|
|
630
|
+
hideSeparator={hideSeperator}
|
|
631
|
+
backButtonIcon={backButtonIcon}
|
|
632
|
+
showBackButton={showBackButton}
|
|
633
|
+
selectionMode={
|
|
634
|
+
selectedGroups.length > 0 || selecting ? selectionMode : 'none'
|
|
635
|
+
}
|
|
636
|
+
onSelection={onSelectionClicked}
|
|
637
|
+
searchBoxIcon={searchBoxIcon}
|
|
638
|
+
hideSearch={hideSearch}
|
|
639
|
+
hideSubmitIcon={hideSubmitIcon}
|
|
640
|
+
onError={onError}
|
|
641
|
+
onBack={onBack}
|
|
642
|
+
listStyle={{
|
|
643
|
+
..._groupsStyle,
|
|
644
|
+
background: _groupsStyle.backgroundColor,
|
|
645
|
+
}}
|
|
646
|
+
statusIndicatorStyle={_statusIndicatorStyle}
|
|
647
|
+
avatarStyle={_avatarStyle}
|
|
648
|
+
listItemStyle={_listItemStyle}
|
|
649
|
+
/>
|
|
650
|
+
</View>
|
|
651
|
+
);
|
|
652
|
+
}
|
|
653
|
+
);
|