stream-chat-react-native-core 9.4.0-beta.5 → 9.4.0-beta.7

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 (173) hide show
  1. package/lib/commonjs/components/ChannelDetails/hooks/useChannelDetailsActionItems.js +2 -1
  2. package/lib/commonjs/components/ChannelDetails/hooks/useChannelDetailsActionItems.js.map +1 -1
  3. package/lib/commonjs/components/ChannelList/ChannelList.js +4 -1
  4. package/lib/commonjs/components/ChannelList/ChannelList.js.map +1 -1
  5. package/lib/commonjs/components/ChannelList/hooks/useCreateChannelsContext.js +5 -3
  6. package/lib/commonjs/components/ChannelList/hooks/useCreateChannelsContext.js.map +1 -1
  7. package/lib/commonjs/components/ChannelPreview/ChannelPreview.js +3 -0
  8. package/lib/commonjs/components/ChannelPreview/ChannelPreview.js.map +1 -1
  9. package/lib/commonjs/components/ChannelPreview/ChannelPreviewPinnedStatus.js +30 -0
  10. package/lib/commonjs/components/ChannelPreview/ChannelPreviewPinnedStatus.js.map +1 -0
  11. package/lib/commonjs/components/ChannelPreview/ChannelPreviewView.js +8 -3
  12. package/lib/commonjs/components/ChannelPreview/ChannelPreviewView.js.map +1 -1
  13. package/lib/commonjs/components/ChannelPreview/ChannelSwipableWrapper.js +2 -1
  14. package/lib/commonjs/components/ChannelPreview/ChannelSwipableWrapper.js.map +1 -1
  15. package/lib/commonjs/components/ChannelPreview/hooks/index.js +11 -0
  16. package/lib/commonjs/components/ChannelPreview/hooks/index.js.map +1 -1
  17. package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewData.js +3 -0
  18. package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewData.js.map +1 -1
  19. package/lib/commonjs/components/ChannelPreview/hooks/useIsChannelPinned.js +11 -0
  20. package/lib/commonjs/components/ChannelPreview/hooks/useIsChannelPinned.js.map +1 -0
  21. package/lib/commonjs/components/index.js +11 -0
  22. package/lib/commonjs/components/index.js.map +1 -1
  23. package/lib/commonjs/contexts/channelsContext/ChannelsContext.js.map +1 -1
  24. package/lib/commonjs/contexts/componentsContext/defaultComponents.js +2 -0
  25. package/lib/commonjs/contexts/componentsContext/defaultComponents.js.map +1 -1
  26. package/lib/commonjs/contexts/themeContext/utils/theme.js +1 -0
  27. package/lib/commonjs/contexts/themeContext/utils/theme.js.map +1 -1
  28. package/lib/commonjs/hooks/actions/useChannelActionItems.js +20 -1
  29. package/lib/commonjs/hooks/actions/useChannelActionItems.js.map +1 -1
  30. package/lib/commonjs/hooks/actions/useChannelActionItemsById.js +3 -1
  31. package/lib/commonjs/hooks/actions/useChannelActionItemsById.js.map +1 -1
  32. package/lib/commonjs/i18n/ar.json +6 -1
  33. package/lib/commonjs/i18n/en.json +5 -0
  34. package/lib/commonjs/i18n/es.json +6 -1
  35. package/lib/commonjs/i18n/fr.json +6 -1
  36. package/lib/commonjs/i18n/he.json +6 -1
  37. package/lib/commonjs/i18n/hi.json +6 -1
  38. package/lib/commonjs/i18n/it.json +6 -1
  39. package/lib/commonjs/i18n/ja.json +6 -1
  40. package/lib/commonjs/i18n/ko.json +6 -1
  41. package/lib/commonjs/i18n/nl.json +6 -1
  42. package/lib/commonjs/i18n/pt-br.json +6 -1
  43. package/lib/commonjs/i18n/ru.json +6 -1
  44. package/lib/commonjs/i18n/tr.json +6 -1
  45. package/lib/commonjs/version.json +1 -1
  46. package/lib/module/components/ChannelDetails/hooks/useChannelDetailsActionItems.js +2 -1
  47. package/lib/module/components/ChannelDetails/hooks/useChannelDetailsActionItems.js.map +1 -1
  48. package/lib/module/components/ChannelList/ChannelList.js +4 -1
  49. package/lib/module/components/ChannelList/ChannelList.js.map +1 -1
  50. package/lib/module/components/ChannelList/hooks/useCreateChannelsContext.js +5 -3
  51. package/lib/module/components/ChannelList/hooks/useCreateChannelsContext.js.map +1 -1
  52. package/lib/module/components/ChannelPreview/ChannelPreview.js +3 -0
  53. package/lib/module/components/ChannelPreview/ChannelPreview.js.map +1 -1
  54. package/lib/module/components/ChannelPreview/ChannelPreviewPinnedStatus.js +30 -0
  55. package/lib/module/components/ChannelPreview/ChannelPreviewPinnedStatus.js.map +1 -0
  56. package/lib/module/components/ChannelPreview/ChannelPreviewView.js +8 -3
  57. package/lib/module/components/ChannelPreview/ChannelPreviewView.js.map +1 -1
  58. package/lib/module/components/ChannelPreview/ChannelSwipableWrapper.js +2 -1
  59. package/lib/module/components/ChannelPreview/ChannelSwipableWrapper.js.map +1 -1
  60. package/lib/module/components/ChannelPreview/hooks/index.js +11 -0
  61. package/lib/module/components/ChannelPreview/hooks/index.js.map +1 -1
  62. package/lib/module/components/ChannelPreview/hooks/useChannelPreviewData.js +3 -0
  63. package/lib/module/components/ChannelPreview/hooks/useChannelPreviewData.js.map +1 -1
  64. package/lib/module/components/ChannelPreview/hooks/useIsChannelPinned.js +11 -0
  65. package/lib/module/components/ChannelPreview/hooks/useIsChannelPinned.js.map +1 -0
  66. package/lib/module/components/index.js +11 -0
  67. package/lib/module/components/index.js.map +1 -1
  68. package/lib/module/contexts/channelsContext/ChannelsContext.js.map +1 -1
  69. package/lib/module/contexts/componentsContext/defaultComponents.js +2 -0
  70. package/lib/module/contexts/componentsContext/defaultComponents.js.map +1 -1
  71. package/lib/module/contexts/themeContext/utils/theme.js +1 -0
  72. package/lib/module/contexts/themeContext/utils/theme.js.map +1 -1
  73. package/lib/module/hooks/actions/useChannelActionItems.js +20 -1
  74. package/lib/module/hooks/actions/useChannelActionItems.js.map +1 -1
  75. package/lib/module/hooks/actions/useChannelActionItemsById.js +3 -1
  76. package/lib/module/hooks/actions/useChannelActionItemsById.js.map +1 -1
  77. package/lib/module/i18n/ar.json +6 -1
  78. package/lib/module/i18n/en.json +5 -0
  79. package/lib/module/i18n/es.json +6 -1
  80. package/lib/module/i18n/fr.json +6 -1
  81. package/lib/module/i18n/he.json +6 -1
  82. package/lib/module/i18n/hi.json +6 -1
  83. package/lib/module/i18n/it.json +6 -1
  84. package/lib/module/i18n/ja.json +6 -1
  85. package/lib/module/i18n/ko.json +6 -1
  86. package/lib/module/i18n/nl.json +6 -1
  87. package/lib/module/i18n/pt-br.json +6 -1
  88. package/lib/module/i18n/ru.json +6 -1
  89. package/lib/module/i18n/tr.json +6 -1
  90. package/lib/module/version.json +1 -1
  91. package/lib/typescript/components/ChannelList/ChannelList.d.ts +1 -1
  92. package/lib/typescript/components/ChannelList/ChannelList.d.ts.map +1 -1
  93. package/lib/typescript/components/ChannelList/hooks/useCreateChannelsContext.d.ts +1 -1
  94. package/lib/typescript/components/ChannelList/hooks/useCreateChannelsContext.d.ts.map +1 -1
  95. package/lib/typescript/components/ChannelPreview/ChannelPreview.d.ts.map +1 -1
  96. package/lib/typescript/components/ChannelPreview/ChannelPreviewPinnedStatus.d.ts +6 -0
  97. package/lib/typescript/components/ChannelPreview/ChannelPreviewPinnedStatus.d.ts.map +1 -0
  98. package/lib/typescript/components/ChannelPreview/ChannelPreviewView.d.ts +3 -1
  99. package/lib/typescript/components/ChannelPreview/ChannelPreviewView.d.ts.map +1 -1
  100. package/lib/typescript/components/ChannelPreview/ChannelSwipableWrapper.d.ts.map +1 -1
  101. package/lib/typescript/components/ChannelPreview/hooks/index.d.ts +1 -0
  102. package/lib/typescript/components/ChannelPreview/hooks/index.d.ts.map +1 -1
  103. package/lib/typescript/components/ChannelPreview/hooks/useChannelPreviewData.d.ts +1 -0
  104. package/lib/typescript/components/ChannelPreview/hooks/useChannelPreviewData.d.ts.map +1 -1
  105. package/lib/typescript/components/ChannelPreview/hooks/useIsChannelPinned.d.ts +3 -0
  106. package/lib/typescript/components/ChannelPreview/hooks/useIsChannelPinned.d.ts.map +1 -0
  107. package/lib/typescript/components/index.d.ts +1 -0
  108. package/lib/typescript/components/index.d.ts.map +1 -1
  109. package/lib/typescript/contexts/channelsContext/ChannelsContext.d.ts +1 -0
  110. package/lib/typescript/contexts/channelsContext/ChannelsContext.d.ts.map +1 -1
  111. package/lib/typescript/contexts/componentsContext/defaultComponents.d.ts +1 -0
  112. package/lib/typescript/contexts/componentsContext/defaultComponents.d.ts.map +1 -1
  113. package/lib/typescript/contexts/themeContext/ThemeContext.d.ts +1 -0
  114. package/lib/typescript/contexts/themeContext/ThemeContext.d.ts.map +1 -1
  115. package/lib/typescript/contexts/themeContext/utils/theme.d.ts +1 -0
  116. package/lib/typescript/contexts/themeContext/utils/theme.d.ts.map +1 -1
  117. package/lib/typescript/hooks/actions/useChannelActionItems.d.ts +35 -2
  118. package/lib/typescript/hooks/actions/useChannelActionItems.d.ts.map +1 -1
  119. package/lib/typescript/hooks/actions/useChannelActionItemsById.d.ts +3 -2
  120. package/lib/typescript/hooks/actions/useChannelActionItemsById.d.ts.map +1 -1
  121. package/lib/typescript/i18n/ar.json +6 -1
  122. package/lib/typescript/i18n/en.json +5 -0
  123. package/lib/typescript/i18n/es.json +6 -1
  124. package/lib/typescript/i18n/fr.json +6 -1
  125. package/lib/typescript/i18n/he.json +6 -1
  126. package/lib/typescript/i18n/hi.json +6 -1
  127. package/lib/typescript/i18n/it.json +6 -1
  128. package/lib/typescript/i18n/ja.json +6 -1
  129. package/lib/typescript/i18n/ko.json +6 -1
  130. package/lib/typescript/i18n/nl.json +6 -1
  131. package/lib/typescript/i18n/pt-br.json +6 -1
  132. package/lib/typescript/i18n/ru.json +6 -1
  133. package/lib/typescript/i18n/tr.json +6 -1
  134. package/lib/typescript/types/types.d.ts +0 -9
  135. package/lib/typescript/types/types.d.ts.map +1 -1
  136. package/lib/typescript/utils/i18n/Streami18n.d.ts +5 -0
  137. package/lib/typescript/utils/i18n/Streami18n.d.ts.map +1 -1
  138. package/package.json +1 -1
  139. package/src/components/ChannelDetails/__tests__/useChannelDetailsActionItems.test.tsx +6 -2
  140. package/src/components/ChannelDetails/hooks/useChannelDetailsActionItems.ts +1 -1
  141. package/src/components/ChannelList/ChannelList.tsx +3 -0
  142. package/src/components/ChannelList/hooks/useCreateChannelsContext.ts +3 -0
  143. package/src/components/ChannelPreview/ChannelPreview.tsx +21 -3
  144. package/src/components/ChannelPreview/ChannelPreviewPinnedStatus.tsx +25 -0
  145. package/src/components/ChannelPreview/ChannelPreviewView.tsx +18 -2
  146. package/src/components/ChannelPreview/ChannelSwipableWrapper.tsx +5 -1
  147. package/src/components/ChannelPreview/hooks/__tests__/useIsChannelPinned.test.tsx +35 -0
  148. package/src/components/ChannelPreview/hooks/index.ts +1 -0
  149. package/src/components/ChannelPreview/hooks/useChannelPreviewData.ts +3 -1
  150. package/src/components/ChannelPreview/hooks/useIsChannelPinned.ts +8 -0
  151. package/src/components/index.ts +1 -0
  152. package/src/contexts/channelsContext/ChannelsContext.tsx +1 -0
  153. package/src/contexts/componentsContext/defaultComponents.ts +2 -0
  154. package/src/contexts/themeContext/utils/theme.ts +2 -0
  155. package/src/hooks/actions/__tests__/useChannelActionItems.test.tsx +137 -14
  156. package/src/hooks/actions/__tests__/useChannelActionItemsById.test.tsx +3 -1
  157. package/src/hooks/actions/useChannelActionItems.tsx +60 -2
  158. package/src/hooks/actions/useChannelActionItemsById.ts +8 -1
  159. package/src/i18n/ar.json +6 -1
  160. package/src/i18n/en.json +5 -0
  161. package/src/i18n/es.json +6 -1
  162. package/src/i18n/fr.json +6 -1
  163. package/src/i18n/he.json +6 -1
  164. package/src/i18n/hi.json +6 -1
  165. package/src/i18n/it.json +6 -1
  166. package/src/i18n/ja.json +6 -1
  167. package/src/i18n/ko.json +6 -1
  168. package/src/i18n/nl.json +6 -1
  169. package/src/i18n/pt-br.json +6 -1
  170. package/src/i18n/ru.json +6 -1
  171. package/src/i18n/tr.json +6 -1
  172. package/src/types/types.ts +0 -9
  173. package/src/version.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Streami18n.d.ts","sourceRoot":"","sources":["../../../../src/utils/i18n/Streami18n.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,OAAa,EAAE,KAAK,IAAI,IAAI,YAAY,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAElF,OAAO,K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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAA2B;IAE1C;;OAEG;IACG,cAAc;;;;IAmBpB;;OAEG;IACH,mBAAmB,CACjB,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,OAAO,CAAC,OAAO,cAAc,CAAC,EAC3C,iBAAiB,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC;IA+BtC,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC;IASvD;;;OAGG;IACG,WAAW,CAAC,QAAQ,EAAE,MAAM;IAsBlC,2BAA2B,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,SAAS,KAAK,IAAI;;;IAW5D,8BAA8B,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,SAAS,KAAK,IAAI;;;IAW/D,iBAAiB,CAAC,SAAS,EAAE,SAAS;CAQvC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "stream-chat-react-native-core",
3
3
  "description": "The official React Native and Expo components for Stream Chat, a service for building chat applications",
4
- "version": "9.4.0-beta.5",
4
+ "version": "9.4.0-beta.7",
5
5
  "author": {
6
6
  "company": "Stream.io Inc",
7
7
  "name": "Stream.io Inc"
@@ -51,7 +51,11 @@ describe('useChannelDetailsActionItems', () => {
51
51
  renderHook(() => useChannelDetailsActionItems());
52
52
 
53
53
  expect(spy).toHaveBeenCalledTimes(1);
54
- expect(spy).toHaveBeenCalledWith({ channel, getChannelActionItems: undefined });
54
+ expect(spy).toHaveBeenCalledWith({
55
+ channel,
56
+ getChannelActionItems: undefined,
57
+ surface: 'details',
58
+ });
55
59
  });
56
60
 
57
61
  it('forwards the getChannelActionItems prop from context unchanged', () => {
@@ -61,7 +65,7 @@ describe('useChannelDetailsActionItems', () => {
61
65
 
62
66
  renderHook(() => useChannelDetailsActionItems());
63
67
 
64
- expect(spy).toHaveBeenCalledWith({ channel, getChannelActionItems });
68
+ expect(spy).toHaveBeenCalledWith({ channel, getChannelActionItems, surface: 'details' });
65
69
  });
66
70
 
67
71
  it('returns non-leave/non-delete items referentially unchanged', () => {
@@ -12,7 +12,7 @@ import {
12
12
  export const useChannelDetailsActionItems = (): ChannelActionItem[] => {
13
13
  const { channel, getChannelActionItems, onChannelDismiss } = useChannelDetailsContext();
14
14
 
15
- const items = useChannelActionItems({ channel, getChannelActionItems });
15
+ const items = useChannelActionItems({ channel, getChannelActionItems, surface: 'details' });
16
16
 
17
17
  return useMemo(
18
18
  () =>
@@ -41,6 +41,7 @@ export type ChannelListProps = Partial<
41
41
  | 'maxUnreadCount'
42
42
  | 'numberOfSkeletons'
43
43
  | 'mutedStatusPosition'
44
+ | 'pinnedStatusPosition'
44
45
  >
45
46
  > & {
46
47
  /** Optional function to filter channels prior to rendering the list. Do not use any complex logic that would delay the loading of the ChannelList. We recommend using a pure function with array methods like filter/sort/reduce. */
@@ -252,6 +253,7 @@ export const ChannelList = (props: ChannelListProps) => {
252
253
  queryChannelsOverride,
253
254
  notificationHostId: notificationHostIdProp,
254
255
  mutedStatusPosition = 'inlineTitle',
256
+ pinnedStatusPosition = 'inlineTitle',
255
257
  swipeActionsEnabled = true,
256
258
  } = props;
257
259
 
@@ -375,6 +377,7 @@ export const ChannelList = (props: ChannelListProps) => {
375
377
  }
376
378
  },
377
379
  mutedStatusPosition,
380
+ pinnedStatusPosition,
378
381
  });
379
382
 
380
383
  return (
@@ -23,6 +23,7 @@ export const useCreateChannelsContext = ({
23
23
  reloadList,
24
24
  setFlatListRef,
25
25
  mutedStatusPosition,
26
+ pinnedStatusPosition,
26
27
  }: ChannelsContextValue) => {
27
28
  const channelValueString = channels
28
29
  ?.map(
@@ -56,6 +57,7 @@ export const useCreateChannelsContext = ({
56
57
  reloadList,
57
58
  setFlatListRef,
58
59
  mutedStatusPosition,
60
+ pinnedStatusPosition,
59
61
  }),
60
62
  // eslint-disable-next-line react-hooks/exhaustive-deps
61
63
  [
@@ -69,6 +71,7 @@ export const useCreateChannelsContext = ({
69
71
  swipeActionsEnabled,
70
72
  refreshing,
71
73
  mutedStatusPosition,
74
+ pinnedStatusPosition,
72
75
  ],
73
76
  );
74
77
 
@@ -30,19 +30,37 @@ export const ChannelPreview = (props: ChannelPreviewProps) => {
30
30
 
31
31
  const client = propClient || contextClient;
32
32
 
33
- const { muted, unread, lastMessage } = useChannelPreviewData(channel, client, propForceUpdate);
33
+ const { muted, pinned, unread, lastMessage } = useChannelPreviewData(
34
+ channel,
35
+ client,
36
+ propForceUpdate,
37
+ );
34
38
 
35
39
  const translatedLastMessage = useTranslatedMessage(lastMessage);
36
40
 
37
41
  const message = translatedLastMessage ? translatedLastMessage : lastMessage;
38
42
 
39
43
  if (!swipeActionsEnabled) {
40
- return <ChannelPreview channel={channel} muted={muted} unread={unread} lastMessage={message} />;
44
+ return (
45
+ <ChannelPreview
46
+ channel={channel}
47
+ muted={muted}
48
+ pinned={pinned}
49
+ unread={unread}
50
+ lastMessage={message}
51
+ />
52
+ );
41
53
  }
42
54
 
43
55
  return (
44
56
  <ChannelSwipableWrapper channel={channel} getChannelActionItems={getChannelActionItems}>
45
- <ChannelPreview channel={channel} muted={muted} unread={unread} lastMessage={message} />
57
+ <ChannelPreview
58
+ channel={channel}
59
+ muted={muted}
60
+ pinned={pinned}
61
+ unread={unread}
62
+ lastMessage={message}
63
+ />
46
64
  </ChannelSwipableWrapper>
47
65
  );
48
66
  };
@@ -0,0 +1,25 @@
1
+ import React from 'react';
2
+
3
+ import { useA11yLabel } from '../../a11y/hooks/useA11yLabel';
4
+ import { useTheme } from '../../contexts/themeContext/ThemeContext';
5
+ import { Pin } from '../../icons';
6
+ import { CompositeAccessibilityProbe } from '../Accessibility/CompositeAccessibilityProbe';
7
+
8
+ /**
9
+ * This UI component displays a pinned indicator for a particular channel.
10
+ */
11
+ export const ChannelPreviewPinnedStatus = () => {
12
+ const {
13
+ theme: {
14
+ channelPreview: { pinnedStatus },
15
+ semantics,
16
+ },
17
+ } = useTheme();
18
+ const accessibilityLabel = useA11yLabel('a11y/Pinned');
19
+
20
+ return (
21
+ <CompositeAccessibilityProbe label={accessibilityLabel}>
22
+ <Pin height={20} stroke={semantics.textTertiary} width={20} {...pinnedStatus} />
23
+ </CompositeAccessibilityProbe>
24
+ );
25
+ };
@@ -17,7 +17,10 @@ import { useStableCallback } from '../../hooks';
17
17
  import { primitives } from '../../theme';
18
18
 
19
19
  export type ChannelPreviewViewPropsWithContext = Pick<ChannelPreviewProps, 'channel'> &
20
- Pick<ChannelsContextValue, 'maxUnreadCount' | 'onSelect' | 'mutedStatusPosition'> & {
20
+ Pick<
21
+ ChannelsContextValue,
22
+ 'maxUnreadCount' | 'onSelect' | 'mutedStatusPosition' | 'pinnedStatusPosition'
23
+ > & {
21
24
  /**
22
25
  * Formatter function for date of latest message.
23
26
  * @param date Message date
@@ -30,6 +33,8 @@ export type ChannelPreviewViewPropsWithContext = Pick<ChannelPreviewProps, 'chan
30
33
  formatLatestMessageDate?: (date: Date) => string;
31
34
  /** If the channel is muted. */
32
35
  muted?: boolean;
36
+ /** If the channel is pinned for the current user. */
37
+ pinned?: boolean;
33
38
  /** Number of unread messages on the channel */
34
39
  unread?: number;
35
40
  lastMessage?: LastMessageType;
@@ -42,14 +47,17 @@ const ChannelPreviewViewWithContext = (props: ChannelPreviewViewPropsWithContext
42
47
  maxUnreadCount,
43
48
  muted,
44
49
  onSelect,
50
+ pinned,
45
51
  unread,
46
52
  mutedStatusPosition,
53
+ pinnedStatusPosition,
47
54
  lastMessage,
48
55
  } = props;
49
56
  const {
50
57
  ChannelPreviewAvatar,
51
58
  ChannelPreviewMessage,
52
59
  ChannelPreviewMutedStatus,
60
+ ChannelPreviewPinnedStatus,
53
61
  ChannelPreviewStatus,
54
62
  ChannelPreviewTitle,
55
63
  ChannelPreviewUnreadCount,
@@ -111,6 +119,9 @@ const ChannelPreviewViewWithContext = (props: ChannelPreviewViewPropsWithContext
111
119
  {muted && mutedStatusPosition === 'inlineTitle' ? (
112
120
  <ChannelPreviewMutedStatus />
113
121
  ) : null}
122
+ {pinned && pinnedStatusPosition === 'inlineTitle' ? (
123
+ <ChannelPreviewPinnedStatus />
124
+ ) : null}
114
125
  </View>
115
126
 
116
127
  <View style={[styles.statusContainer, statusContainer]}>
@@ -132,6 +143,9 @@ const ChannelPreviewViewWithContext = (props: ChannelPreviewViewPropsWithContext
132
143
  {muted && mutedStatusPosition === 'trailingBottom' ? (
133
144
  <ChannelPreviewMutedStatus />
134
145
  ) : null}
146
+ {pinned && pinnedStatusPosition === 'trailingBottom' ? (
147
+ <ChannelPreviewPinnedStatus />
148
+ ) : null}
135
149
  </View>
136
150
  </View>
137
151
  </Pressable>
@@ -151,7 +165,8 @@ const MemoizedChannelPreviewViewWithContext = React.memo(
151
165
  * from the ChannelPreview component.
152
166
  */
153
167
  export const ChannelPreviewView = (props: ChannelPreviewViewProps) => {
154
- const { forceUpdate, maxUnreadCount, onSelect, mutedStatusPosition } = useChannelsContext();
168
+ const { forceUpdate, maxUnreadCount, onSelect, mutedStatusPosition, pinnedStatusPosition } =
169
+ useChannelsContext();
155
170
  return (
156
171
  <MemoizedChannelPreviewViewWithContext
157
172
  {...{
@@ -159,6 +174,7 @@ export const ChannelPreviewView = (props: ChannelPreviewViewProps) => {
159
174
  maxUnreadCount,
160
175
  onSelect,
161
176
  mutedStatusPosition,
177
+ pinnedStatusPosition,
162
178
  }}
163
179
  {...props}
164
180
  />
@@ -41,7 +41,11 @@ export const ChannelSwipableWrapper = ({
41
41
  }>) => {
42
42
  const { ChannelDetailsBottomSheet: ChannelDetailsBottomSheetComponent } = useComponentsContext();
43
43
  const [channelDetailSheetOpen, setChannelDetailSheetOpen] = useState(false);
44
- const channelActionItems = useChannelActionItems({ channel, getChannelActionItems });
44
+ const channelActionItems = useChannelActionItems({
45
+ channel,
46
+ getChannelActionItems,
47
+ surface: 'list',
48
+ });
45
49
  const sheetItems = useMemo(
46
50
  () => channelActionItems.filter((item) => item.placement !== 'swipe'),
47
51
  [channelActionItems],
@@ -0,0 +1,35 @@
1
+ import { renderHook } from '@testing-library/react-native';
2
+ import { Channel } from 'stream-chat';
3
+
4
+ import { useIsChannelPinned } from '../useIsChannelPinned';
5
+
6
+ describe('useIsChannelPinned', () => {
7
+ afterEach(() => {
8
+ jest.clearAllMocks();
9
+ });
10
+
11
+ const buildMockChannel = (membership: Record<string, unknown> = {}) =>
12
+ ({
13
+ initialized: true,
14
+ on: jest.fn().mockReturnValue({ unsubscribe: jest.fn() }),
15
+ state: { membership },
16
+ }) as unknown as Channel;
17
+
18
+ it('returns false when membership has no pinned_at', () => {
19
+ const channel = buildMockChannel({ pinned_at: null });
20
+ const { result } = renderHook(() => useIsChannelPinned(channel));
21
+ expect(result.current).toBe(false);
22
+ });
23
+
24
+ it('returns true when membership has a pinned_at timestamp', () => {
25
+ const channel = buildMockChannel({ pinned_at: '2026-06-15T08:00:00.000Z' });
26
+ const { result } = renderHook(() => useIsChannelPinned(channel));
27
+ expect(result.current).toBe(true);
28
+ });
29
+
30
+ it('subscribes to member.updated events', () => {
31
+ const channel = buildMockChannel({ pinned_at: null });
32
+ renderHook(() => useIsChannelPinned(channel));
33
+ expect(channel.on).toHaveBeenCalledWith('member.updated', expect.any(Function));
34
+ });
35
+ });
@@ -4,4 +4,5 @@ export * from './useChannelPreviewPollLabel';
4
4
  export * from './useChannelPreviewDisplayName';
5
5
  export * from './useChannelPreviewDisplayPresence';
6
6
  export * from './useIsChannelMuted';
7
+ export * from './useIsChannelPinned';
7
8
  export * from './useChannelTypingState';
@@ -4,6 +4,7 @@ import throttle from 'lodash/throttle';
4
4
  import type { Channel, Event, LocalMessage, MessageResponse, StreamChat } from 'stream-chat';
5
5
 
6
6
  import { useIsChannelMuted } from './useIsChannelMuted';
7
+ import { useIsChannelPinned } from './useIsChannelPinned';
7
8
 
8
9
  import { useChannelsContext } from '../../../contexts';
9
10
  import { useStableCallback } from '../../../hooks';
@@ -39,6 +40,7 @@ export const useChannelPreviewData = (
39
40
  );
40
41
  const [unread, setUnread] = useState(channel.countUnread());
41
42
  const { muted } = useIsChannelMuted(channel);
43
+ const pinned = useIsChannelPinned(channel);
42
44
  const { forceUpdate: contextForceUpdate } = useChannelsContext();
43
45
  const channelListForceUpdate = forceUpdateOverride ?? contextForceUpdate;
44
46
 
@@ -170,5 +172,5 @@ export const useChannelPreviewData = (
170
172
  return () => listeners.forEach((l) => l.unsubscribe());
171
173
  }, [channel, refreshUnreadCount, forceUpdate, channelListForceUpdate, setLastMessage]);
172
174
 
173
- return { lastMessage, muted, unread };
175
+ return { lastMessage, muted, pinned, unread };
174
176
  };
@@ -0,0 +1,8 @@
1
+ import type { Channel } from 'stream-chat';
2
+
3
+ import { useChannelMembershipState } from '../../../hooks/useChannelMembershipState';
4
+
5
+ export const useIsChannelPinned = (channel: Channel) => {
6
+ const membership = useChannelMembershipState(channel);
7
+ return Boolean(membership?.pinned_at);
8
+ };
@@ -56,6 +56,7 @@ export * from './ChannelPreview/ChannelPreview';
56
56
  export * from './ChannelPreview/ChannelPreviewMessage';
57
57
  export * from './ChannelPreview/ChannelPreviewView';
58
58
  export * from './ChannelPreview/ChannelPreviewMutedStatus';
59
+ export * from './ChannelPreview/ChannelPreviewPinnedStatus';
59
60
  export * from './ChannelPreview/ChannelLastMessagePreview';
60
61
  export * from './ChannelPreview/ChannelPreviewStatus';
61
62
  export * from './ChannelPreview/ChannelPreviewTitle';
@@ -118,6 +118,7 @@ export type ChannelsContextValue = {
118
118
  swipeActionsEnabled?: boolean;
119
119
 
120
120
  mutedStatusPosition?: 'trailingBottom' | 'inlineTitle';
121
+ pinnedStatusPosition?: 'trailingBottom' | 'inlineTitle';
121
122
  };
122
123
 
123
124
  export const ChannelsContext = React.createContext(
@@ -53,6 +53,7 @@ import { ChannelLastMessagePreview } from '../../components/ChannelPreview/Chann
53
53
  import { ChannelMessagePreviewDeliveryStatus } from '../../components/ChannelPreview/ChannelMessagePreviewDeliveryStatus';
54
54
  import { ChannelPreviewMessage } from '../../components/ChannelPreview/ChannelPreviewMessage';
55
55
  import { ChannelPreviewMutedStatus } from '../../components/ChannelPreview/ChannelPreviewMutedStatus';
56
+ import { ChannelPreviewPinnedStatus } from '../../components/ChannelPreview/ChannelPreviewPinnedStatus';
56
57
  import { ChannelPreviewStatus } from '../../components/ChannelPreview/ChannelPreviewStatus';
57
58
  import { ChannelPreviewTitle } from '../../components/ChannelPreview/ChannelPreviewTitle';
58
59
  import { ChannelPreviewTypingIndicator } from '../../components/ChannelPreview/ChannelPreviewTypingIndicator';
@@ -271,6 +272,7 @@ const components = {
271
272
  ChannelPreviewMessage,
272
273
  ChannelPreviewMessageDeliveryStatus: ChannelMessagePreviewDeliveryStatus,
273
274
  ChannelPreviewMutedStatus,
275
+ ChannelPreviewPinnedStatus,
274
276
  ChannelPreviewStatus,
275
277
  ChannelPreviewTitle,
276
278
  ChannelPreviewTypingIndicator,
@@ -299,6 +299,7 @@ export type Theme = {
299
299
  contentContainer: ViewStyle;
300
300
  date: TextStyle;
301
301
  mutedStatus: IconProps;
302
+ pinnedStatus: IconProps;
302
303
  messageDeliveryStatus: {
303
304
  container: ViewStyle;
304
305
  text: TextStyle;
@@ -1357,6 +1358,7 @@ export const defaultTheme: Theme = {
1357
1358
  timeIcon: {},
1358
1359
  },
1359
1360
  mutedStatus: {},
1361
+ pinnedStatus: {},
1360
1362
  lowerRow: {},
1361
1363
  title: {},
1362
1364
  unreadContainer: {},