Skip to content

Commit 6e22447

Browse files
Add deprecation warnings to the unused hooks
1 parent 56def19 commit 6e22447

10 files changed

+30
-0
lines changed

src/components/ChannelList/hooks/useChannelDeletedListener.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ import type { Channel, Event } from 'stream-chat';
66

77
import type { DefaultStreamChatGenerics } from '../../../types/types';
88

9+
/**
10+
* @deprecated Use `useChannelListShape` instead.
11+
*/
912
export const useChannelDeletedListener = <
1013
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics
1114
>(

src/components/ChannelList/hooks/useChannelHiddenListener.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ import type { Channel, Event } from 'stream-chat';
66

77
import type { DefaultStreamChatGenerics } from '../../../types/types';
88

9+
/**
10+
* @deprecated Use `useChannelListShape` instead.
11+
*/
912
export const useChannelHiddenListener = <
1013
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics
1114
>(

src/components/ChannelList/hooks/useChannelMembershipState.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ import type { Channel, ChannelState, ExtendableGenerics } from 'stream-chat';
33

44
import { useChatContext } from '../../../context';
55

6+
/**
7+
* @deprecated Use `useChannelListShape` instead.
8+
*/
69
export const useChannelMembershipState = <SCG extends ExtendableGenerics>(
710
channel?: Channel<SCG>,
811
) => {

src/components/ChannelList/hooks/useChannelTruncatedListener.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ import type { Channel, Event } from 'stream-chat';
66

77
import type { DefaultStreamChatGenerics } from '../../../types/types';
88

9+
/**
10+
* @deprecated Use `useChannelListShape` instead.
11+
*/
912
export const useChannelTruncatedListener = <
1013
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics
1114
>(

src/components/ChannelList/hooks/useChannelUpdatedListener.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ import type { Channel, Event } from 'stream-chat';
66

77
import type { DefaultStreamChatGenerics } from '../../../types/types';
88

9+
/**
10+
* @deprecated Use `useChannelListShape` instead.
11+
*/
912
export const useChannelUpdatedListener = <
1013
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics
1114
>(

src/components/ChannelList/hooks/useChannelVisibleListener.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ import type { Channel, Event } from 'stream-chat';
99

1010
import type { DefaultStreamChatGenerics } from '../../../types/types';
1111

12+
/**
13+
* @deprecated Use `useChannelListShape` instead.
14+
*/
1215
export const useChannelVisibleListener = <
1316
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics
1417
>(

src/components/ChannelList/hooks/useMessageNewListener.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ import type { Channel, Event } from 'stream-chat';
99

1010
import type { DefaultStreamChatGenerics } from '../../../types/types';
1111

12+
/**
13+
* @deprecated Use `useChannelListShape` instead.
14+
*/
1215
export const useMessageNewListener = <
1316
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics
1417
>(

src/components/ChannelList/hooks/useNotificationAddedToChannelListener.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ import type { Channel, Event } from 'stream-chat';
99

1010
import type { DefaultStreamChatGenerics } from '../../../types/types';
1111

12+
/**
13+
* @deprecated Use `useChannelListShape` instead.
14+
*/
1215
export const useNotificationAddedToChannelListener = <
1316
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics
1417
>(

src/components/ChannelList/hooks/useNotificationMessageNewListener.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ import type { Channel, Event } from 'stream-chat';
99

1010
import type { DefaultStreamChatGenerics } from '../../../types/types';
1111

12+
/**
13+
* @deprecated Use `useChannelListShape` instead.
14+
*/
1215
export const useNotificationMessageNewListener = <
1316
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics
1417
>(

src/components/ChannelList/hooks/useNotificationRemovedFromChannelListener.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ import type { Channel, Event } from 'stream-chat';
66

77
import type { DefaultStreamChatGenerics } from '../../../types/types';
88

9+
/**
10+
* @deprecated Use `useChannelListShape` instead.
11+
*/
912
export const useNotificationRemovedFromChannelListener = <
1013
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics
1114
>(

0 commit comments

Comments
 (0)