load preferences

This commit is contained in:
Hailey
2024-06-26 11:24:14 -07:00
parent d6a2ee4e9e
commit f9c5c42290
4 changed files with 13 additions and 2 deletions
@@ -31,7 +31,9 @@ export function BackgroundNotificationPreferencesProvider({
React.useEffect(() => {
;(async () => {
const prefs = await BackgroundNotifications.getPrefsAsync()
setPreferences(prefs)
if (prefs) {
setPreferences(prefs)
}
})()
}, [])
@@ -19,6 +19,6 @@ export function decrementMessagesCountAsync(
throw new NotImplementedError({count, convoId})
}
export function getPrefsAsync(): Promise<BackgroundNotificationHandlerPreferences> {
export function getPrefsAsync(): Promise<BackgroundNotificationHandlerPreferences | null> {
throw new NotImplementedError()
}