From 869f6c4e0e464b7f5be9ef5676210ae8844bd834 Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Tue, 24 Jan 2023 19:32:24 -0600 Subject: Initial pass at push notifications + some fixes to the session management (#91) * Fix: test the session during resume to ensure it's valid * Don't delete sessions for now * Add notifee and request notif permissions on first login * Set unread notifications badge on app icon * Trigger a notifee card on new notifications * Experimental: use react-native-background-fetch to check for notifications * Add missing mocks * Fix to resumeSession() --- __mocks__/react-native-background-fetch.ts | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 __mocks__/react-native-background-fetch.ts (limited to '__mocks__/react-native-background-fetch.ts') diff --git a/__mocks__/react-native-background-fetch.ts b/__mocks__/react-native-background-fetch.ts new file mode 100644 index 000000000..0cb644c4d --- /dev/null +++ b/__mocks__/react-native-background-fetch.ts @@ -0,0 +1,4 @@ +export default { + configure: jest.fn().mockResolvedValue(0), + finish: jest.fn(), +} -- cgit 1.4.1