Skip to content

Commit 515d3e9

Browse files
authored
Merge pull request #502 from GetStream/do-not-call-stop-watch-for-deleted-channel
fix: don't call stop watch for deleted channel
2 parents 5a434f1 + 1c3ae4f commit 515d3e9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

projects/stream-chat-angular/src/lib/channel.service.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,7 @@ describe('ChannelService', () => {
752752
const channels = spy.calls.mostRecent().args[0] as Channel[];
753753

754754
expect(channels.find((c) => c.cid === channel.cid)).toBeUndefined();
755-
expect(channel.stopWatching).toHaveBeenCalledWith();
755+
expect(channel.stopWatching).not.toHaveBeenCalledWith();
756756
});
757757

758758
it('should call #customChannelDeletedHandler, if channel is deleted and handler is provided', async () => {

projects/stream-chat-angular/src/lib/channel.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1640,7 +1640,7 @@ export class ChannelService<
16401640
}
16411641

16421642
private handleChannelDeleted(event: Event) {
1643-
this.removeChannelsFromChannelList([event.channel!.cid], true);
1643+
this.removeChannelsFromChannelList([event.channel!.cid], false);
16441644
}
16451645

16461646
private handleChannelVisible(event: Event, channel: Channel<T>) {

0 commit comments

Comments
 (0)