Skip to content

Commit d3f9c3c

Browse files
authored
[CLNP-6874] No mark as delivered if disableMarkAsDelivered is set to true (#1340)
[fix]: No mark as delivered if `disableMarkAsDelivered` is set to `true` Fixes [CLNP-6874](https://sendbird.atlassian.net/browse/CLNP-6874) ### Changelogs - Fixed a bug that channel is marked as delivered with `disableMarkAsDelivered` set to `true` ### Checklist Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If unsure, ask the members. This is a reminder of what we look for before merging your code. - [x] **All tests pass locally with my changes** - [ ] **I have added tests that prove my fix is effective or that my feature works** - [ ] **Public components / utils / props are appropriately exported** - [ ] I have added necessary documentation (if appropriate) [CLNP-6874]: https://sendbird.atlassian.net/browse/CLNP-6874?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
1 parent 02fb202 commit d3f9c3c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/modules/GroupChannelList/context/GroupChannelListProvider.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,11 @@ export const GroupChannelListManager: React.FC<GroupChannelListProviderProps> =
120120

121121
const channelListDataSource = useGroupChannelListDataSource(sdk, {
122122
collectionCreator: getCollectionCreator(sdk, channelListQueryParams),
123-
markAsDelivered: (channels) => channels.forEach(scheduler.push),
123+
markAsDelivered: (channels) => {
124+
if (!config.disableMarkAsDelivered) {
125+
channels.forEach(scheduler.push);
126+
}
127+
},
124128
onChannelsDeleted: (channelUrls) => {
125129
channelUrls.forEach((url) => {
126130
if (url === selectedChannelUrl) onChannelSelect(null);

0 commit comments

Comments
 (0)