stream-chat-react-native-core 5.15.0 → 5.15.1-beta.1

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.
Files changed (35) hide show
  1. package/lib/commonjs/components/ChannelList/ChannelList.js +4 -2
  2. package/lib/commonjs/components/ChannelList/ChannelList.js.map +1 -1
  3. package/lib/commonjs/components/ChannelList/hooks/useCreateChannelsContext.js +2 -0
  4. package/lib/commonjs/components/ChannelList/hooks/useCreateChannelsContext.js.map +1 -1
  5. package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessenger.js +2 -4
  6. package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessenger.js.map +1 -1
  7. package/lib/commonjs/components/ChannelPreview/ChannelPreviewMutedStatus.js +4 -5
  8. package/lib/commonjs/components/ChannelPreview/ChannelPreviewMutedStatus.js.map +1 -1
  9. package/lib/commonjs/contexts/channelsContext/ChannelsContext.js +2 -2
  10. package/lib/commonjs/contexts/channelsContext/ChannelsContext.js.map +1 -1
  11. package/lib/commonjs/version.json +1 -1
  12. package/lib/module/components/ChannelList/ChannelList.js +4 -2
  13. package/lib/module/components/ChannelList/ChannelList.js.map +1 -1
  14. package/lib/module/components/ChannelList/hooks/useCreateChannelsContext.js +2 -0
  15. package/lib/module/components/ChannelList/hooks/useCreateChannelsContext.js.map +1 -1
  16. package/lib/module/components/ChannelPreview/ChannelPreviewMessenger.js +2 -4
  17. package/lib/module/components/ChannelPreview/ChannelPreviewMessenger.js.map +1 -1
  18. package/lib/module/components/ChannelPreview/ChannelPreviewMutedStatus.js +4 -5
  19. package/lib/module/components/ChannelPreview/ChannelPreviewMutedStatus.js.map +1 -1
  20. package/lib/module/contexts/channelsContext/ChannelsContext.js +2 -2
  21. package/lib/module/contexts/channelsContext/ChannelsContext.js.map +1 -1
  22. package/lib/module/version.json +1 -1
  23. package/lib/typescript/components/ChannelList/ChannelList.d.ts +1 -1
  24. package/lib/typescript/components/ChannelList/hooks/useCreateChannelsContext.d.ts +1 -1
  25. package/lib/typescript/components/ChannelPreview/ChannelPreviewMutedStatus.d.ts +1 -6
  26. package/lib/typescript/components/Message/hooks/useMessageActionHandlers.d.ts +1 -1
  27. package/lib/typescript/components/Message/hooks/useMessageActions.d.ts +1 -1
  28. package/lib/typescript/contexts/channelsContext/ChannelsContext.d.ts +1 -2
  29. package/package.json +1 -1
  30. package/src/components/ChannelList/ChannelList.tsx +3 -0
  31. package/src/components/ChannelList/hooks/useCreateChannelsContext.ts +2 -0
  32. package/src/components/ChannelPreview/ChannelPreviewMessenger.tsx +1 -1
  33. package/src/components/ChannelPreview/ChannelPreviewMutedStatus.tsx +3 -18
  34. package/src/contexts/channelsContext/ChannelsContext.tsx +1 -3
  35. package/src/version.json +1 -1
@@ -2,11 +2,8 @@ import React from 'react';
2
2
 
3
3
  import { StyleSheet } from 'react-native';
4
4
 
5
- import type { ChannelPreviewProps } from './ChannelPreview';
6
-
7
5
  import { useTheme } from '../../contexts/themeContext/ThemeContext';
8
6
  import { Mute } from '../../icons';
9
- import type { DefaultStreamChatGenerics } from '../../types/types';
10
7
 
11
8
  const styles = StyleSheet.create({
12
9
  iconStyle: {
@@ -14,22 +11,10 @@ const styles = StyleSheet.create({
14
11
  },
15
12
  });
16
13
 
17
- export type ChannelPreviewMutedStatusProps<
18
- StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
19
- > = Pick<ChannelPreviewProps<StreamChatGenerics>, 'channel'> & {
20
- muted: boolean;
21
- };
22
-
23
14
  /**
24
15
  * This UI component displays an avatar for a particular channel.
25
16
  */
26
- export const ChannelPreviewMutedStatus = <
27
- StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
28
- >(
29
- props: ChannelPreviewMutedStatusProps<StreamChatGenerics>,
30
- ) => {
31
- const { muted } = props;
32
-
17
+ export const ChannelPreviewMutedStatus = () => {
33
18
  const {
34
19
  theme: {
35
20
  channelPreview: {
@@ -39,12 +24,12 @@ export const ChannelPreviewMutedStatus = <
39
24
  },
40
25
  } = useTheme();
41
26
 
42
- return muted ? (
27
+ return (
43
28
  <Mute
44
29
  height={height}
45
30
  pathFill={grey_dark}
46
31
  style={[styles.iconStyle, iconStyle]}
47
32
  width={width}
48
33
  />
49
- ) : null;
34
+ );
50
35
  };
@@ -3,8 +3,6 @@ import React, { PropsWithChildren, useContext } from 'react';
3
3
  import type { FlatListProps } from 'react-native';
4
4
  import type { FlatList } from 'react-native-gesture-handler';
5
5
 
6
- import type { ChannelPreviewMutedStatusProps } from 'src/components/ChannelPreview/ChannelPreviewMutedStatus';
7
-
8
6
  import type { Channel } from 'stream-chat';
9
7
 
10
8
  import type { HeaderErrorProps } from '../../components/ChannelList/ChannelListHeaderErrorIndicator';
@@ -189,7 +187,7 @@ export type ChannelsContextValue<
189
187
  *
190
188
  * **Default** [ChannelMutedStatus](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/ChannelPreview/ChannelPreviewMutedStatus.tsx)
191
189
  */
192
- PreviewMutedStatus?: React.ComponentType<ChannelPreviewMutedStatusProps<StreamChatGenerics>>;
190
+ PreviewMutedStatus?: React.ComponentType;
193
191
  /**
194
192
  * Custom UI component to render preview avatar.
195
193
  *
package/src/version.json CHANGED
@@ -1,3 +1,3 @@
1
1
  {
2
- "version": "5.15.0"
2
+ "version": "5.15.1-beta.1"
3
3
  }