From ca810065f8f06153a047b082f50109a7084a0eb1 Mon Sep 17 00:00:00 2001 From: Zhiyuan Zheng Date: Tue, 21 Jun 2022 23:10:40 +0200 Subject: [PATCH] Force clearing push count --- src/utils/push/useConnect.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/push/useConnect.ts b/src/utils/push/useConnect.ts index e89b8610..3d8ad47f 100644 --- a/src/utils/push/useConnect.ts +++ b/src/utils/push/useConnect.ts @@ -94,8 +94,8 @@ const pushUseConnect = ({ t, instances }: Params) => { }, [expoToken, pushEnabled.length]) return useEffect(() => { + Notifications.setBadgeCountAsync(0) if (expoToken && pushEnabled.length) { - Notifications.setBadgeCountAsync(0) connect() } }, [expoToken, pushEnabled.length])