Skip to content

Commit

Permalink
fix: exports of hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
khushal87 committed Dec 25, 2024
1 parent 4797266 commit 82cee02
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
3 changes: 0 additions & 3 deletions examples/SampleApp/src/screens/ChannelListScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,6 @@ export const ChannelListScreen: React.FC = () => {
channel,
});
}}
onNewMessage={(arg1, arg2, arg3, arg4) => {
console.log(arg1, arg2, arg3, arg4);
}}
options={options}
Preview={ChannelPreview}
setFlatListRef={setScrollRef}
Expand Down
18 changes: 9 additions & 9 deletions package/src/components/ChannelList/ChannelList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import type { DefaultStreamChatGenerics } from '../../types/types';
import { ChannelPreviewMessenger } from '../ChannelPreview/ChannelPreviewMessenger';
import { EmptyStateIndicator as EmptyStateIndicatorDefault } from '../Indicators/EmptyStateIndicator';
import { LoadingErrorIndicator as LoadingErrorIndicatorDefault } from '../Indicators/LoadingErrorIndicator';
import { useChannelMemberUpdated } from './hooks/listeners/useMemberUpdated';
import { useChannelMemberUpdated } from './hooks/listeners/useChannelMemberUpdated';

export type ChannelListProps<
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
Expand Down Expand Up @@ -324,6 +324,14 @@ export const ChannelList = <
setChannels,
});

useChannelMemberUpdated({
lockChannelOrder,
setChannels,
onChannelMemberUpdated,
filters,
sort,
});

useChannelTruncated({
onChannelTruncated,
refreshList,
Expand Down Expand Up @@ -364,14 +372,6 @@ export const ChannelList = <
setForceUpdate,
});

useChannelMemberUpdated({
lockChannelOrder,
setChannels,
onChannelMemberUpdated,
filters,
sort,
});

const channelIdsStr = channels?.reduce((acc, channel) => `${acc}${channel.cid}`, '');

useEffect(() => {
Expand Down
1 change: 1 addition & 0 deletions package/src/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export * from './ChannelList/ChannelListMessenger';
export * from './ChannelList/hooks/listeners/useAddedToChannelNotification';
export * from './ChannelList/hooks/listeners/useChannelDeleted';
export * from './ChannelList/hooks/listeners/useChannelHidden';
export * from './ChannelList/hooks/listeners/useChannelMemberUpdated';
export * from './ChannelList/hooks/listeners/useChannelTruncated';
export * from './ChannelList/hooks/listeners/useChannelUpdated';
export * from './ChannelList/hooks/listeners/useNewMessage';
Expand Down

0 comments on commit 82cee02

Please sign in to comment.