Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions package/src/components/Channel/Channel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ export type ChannelPropsWithContext = Pick<ChannelContextValue, 'channel'> &
| 'enableMessageGroupingByUser'
| 'enforceUniqueReaction'
| 'hideStickyDateHeader'
| 'allowDateSeparatorForSystemMessages'
| 'hideDateSeparators'
| 'maxTimeBetweenGroupedMessages'
| 'maximumMessageLimit'
Expand Down Expand Up @@ -448,6 +449,7 @@ const ChannelWithContext = (props: PropsWithChildren<ChannelPropsWithContext>) =
// If pickDocument isn't available, default to hiding the file picker
hasFilePicker = isDocumentPickerAvailable(),
hasImagePicker = isImagePickerAvailable() || isImageMediaLibraryAvailable(),
allowDateSeparatorForSystemMessages = false,
hideDateSeparators = false,
hideStickyDateHeader = false,
initialScrollToFirstUnreadMessage = false,
Expand Down Expand Up @@ -1601,6 +1603,7 @@ const ChannelWithContext = (props: PropsWithChildren<ChannelPropsWithContext>) =
enableMessageGroupingByUser,
enforceUniqueReaction,
error,
allowDateSeparatorForSystemMessages,
hideDateSeparators,
hideStickyDateHeader,
highlightedMessageId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export const useCreateChannelContext = ({
enableMessageGroupingByUser,
enforceUniqueReaction,
error,
allowDateSeparatorForSystemMessages,
hideDateSeparators,
hideStickyDateHeader,
highlightedMessageId,
Expand Down Expand Up @@ -49,6 +50,7 @@ export const useCreateChannelContext = ({
enableMessageGroupingByUser,
enforceUniqueReaction,
error,
allowDateSeparatorForSystemMessages,
hideDateSeparators,
hideStickyDateHeader,
highlightedMessageId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export const MessageWrapper = React.memo(function MessageWrapper(props: MessageW
const { message, previousMessage, nextMessage } = props;
const { client } = useChatContext();
const {
allowDateSeparatorForSystemMessages,
channelUnreadStateStore,
channel,
hideDateSeparators,
Expand Down Expand Up @@ -111,7 +112,10 @@ export const MessageWrapper = React.memo(function MessageWrapper(props: MessageW
return (
<View testID={`message-list-item-${message.id}`}>
{message.type === 'system' ? (
<MessageSystem message={message} style={messageContainer} />
<>
{allowDateSeparatorForSystemMessages ? renderDateSeperator : null}
<MessageSystem message={message} style={messageContainer} />
</>
) : wrapMessageInTheme ? (
<ThemeProvider mergedStyle={modifiedTheme}>
{renderDateSeperator}
Expand Down
Loading