11import React , { useCallback } from 'react' ;
22import { TouchableOpacity } from 'react-native' ;
33
4- import { CustomQueryInterface , useUserList } from '@sendbird/uikit-chat-hooks' ;
4+ import { useUserList } from '@sendbird/uikit-chat-hooks' ;
55import type { SendbirdParticipant } from '@sendbird/uikit-utils' ;
66
77import StatusComposition from '../components/StatusComposition' ;
@@ -13,18 +13,14 @@ import { useLocalization, useSendbirdChat } from '../hooks/useContext';
1313
1414const createOpenChannelRegisterOperatorFragment = (
1515 initModule ?: Partial < UserListModule < SendbirdParticipant > > ,
16- ) : OpenChannelRegisterOperatorFragment < SendbirdParticipant > => {
16+ ) : OpenChannelRegisterOperatorFragment => {
1717 const UserListModule = createUserListModule < SendbirdParticipant > ( initModule ) ;
1818
19- return ( { channel, onPressHeaderLeft, sortComparator, renderUser, onPressHeaderRight } ) => {
19+ return ( { channel, onPressHeaderLeft, sortComparator, renderUser, onPressHeaderRight, queryCreator } ) => {
2020 const { sdk, currentUser } = useSendbirdChat ( ) ;
2121 const { STRINGS } = useLocalization ( ) ;
2222 const { users, refreshing, refresh, next, error, loading } = useUserList ( sdk , {
23- queryCreator : ( ) => {
24- return channel . createParticipantListQuery ( {
25- limit : 20 ,
26- } ) as unknown as CustomQueryInterface < SendbirdParticipant > ;
27- } ,
23+ queryCreator : queryCreator ?? ( ( ) => channel . createParticipantListQuery ( { limit : 20 } ) ) ,
2824 sortComparator,
2925 } ) ;
3026
@@ -84,7 +80,7 @@ const createOpenChannelRegisterOperatorFragment = (
8480 >
8581 < UserListModule . List
8682 onLoadNext = { next }
87- users = { users }
83+ users = { users as SendbirdParticipant [ ] }
8884 renderUser = { _renderUser }
8985 onRefresh = { refresh }
9086 refreshing = { refreshing }
0 commit comments