Skip to content

Commit cc994a8

Browse files
committed
fix condition
1 parent a403e6e commit cc994a8

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

apps/mobile/src/store/action/hooks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,6 @@ export const useIsActionDataDirty = () => {
6767

6868
export const useHasNotificationActions = () => {
6969
return useActionStore((state) => {
70-
return state.rules.some((rule) => !!rule.result.newEntryNotification)
70+
return state.rules.some((rule) => !!rule.result.newEntryNotification && !rule.result.disabled)
7171
})
7272
}

apps/mobile/src/store/messaging/hooks.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ export function useMessagingToken() {
4040
})
4141

4242
useEffect(() => {
43-
if (!whoami || !hasNotificationActions) return
43+
if (!whoami?.id || !hasNotificationActions) return
4444
mutate()
45-
}, [hasNotificationActions, mutate, whoami])
45+
}, [hasNotificationActions, mutate, whoami?.id])
4646
}
4747

4848
export function useMessaging() {

0 commit comments

Comments
 (0)