Skip to content

Commit

Permalink
fix: Fixed missing fetchUnreadCount from fetchingStrategy
Browse files Browse the repository at this point in the history
  • Loading branch information
Khongchai committed Oct 30, 2023
1 parent ce8a065 commit be40c19
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export const queryClient = new QueryClient({
const DEFAULT_FETCHING_STRATEGY: IFetchingStrategy = {
fetchUnseenCount: true,
fetchOrganization: true,
fetchUnreadCount: false,
fetchNotifications: false,
fetchUserPreferences: false,
fetchUserGlobalPreferences: false,
Expand Down
2 changes: 1 addition & 1 deletion packages/notification-center/src/hooks/useUnreadCount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export const useUnreadCount = ({ onSuccess, ...restOptions }: UseQueryOptions<IC
() => apiService.getUnreadCount({ limit: 100 }),
{
...restOptions,
enabled: isSessionInitialized && fetchingStrategy.fetchUnseenCount,
enabled: isSessionInitialized && fetchingStrategy.fetchUnreadCount,
onSuccess: (data) => {
dispatchUnreadCountEvent(data.count);
onSuccess?.(data);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export interface IStore {

export interface IFetchingStrategy {
fetchUnseenCount: boolean;
fetchUnreadCount: boolean;
fetchOrganization: boolean;
fetchNotifications: boolean;
fetchUserPreferences: boolean;
Expand Down

0 comments on commit be40c19

Please sign in to comment.