Skip to content

Commit

Permalink
fix(headless): dont refetch notifications (#6290)
Browse files Browse the repository at this point in the history
  • Loading branch information
BiswaViraj authored Aug 12, 2024
1 parent f98eb90 commit d60b2e3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/headless/src/lib/headless.service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -577,8 +577,8 @@ describe('headless.service', () => {
});
await promiseResolveTimeout(0);

expect(mockServiceInstance.getNotificationsList).toBeCalledTimes(3);
expect(notificationsListener).toHaveBeenCalledTimes(8);
expect(mockServiceInstance.getNotificationsList).toBeCalledTimes(2);
expect(notificationsListener).toHaveBeenCalledTimes(6);
expect(notificationsListener).toHaveBeenNthCalledWith(
4,
expect.objectContaining({
Expand Down
3 changes: 0 additions & 3 deletions packages/headless/src/lib/headless.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -337,9 +337,6 @@ export class HeadlessService {
WebSocketEventEnum.RECEIVED,
(data?: { message: IMessage }) => {
if (data?.message) {
this.queryClient.refetchQueries(NOTIFICATIONS_QUERY_KEY, {
exact: false,
});
listener(data.message);
}
}
Expand Down

0 comments on commit d60b2e3

Please sign in to comment.