Files
bsky-social-app/modules/expo-background-notification-handler/src/index.native.ts
T
2024-06-26 11:31:27 -07:00

26 lines
739 B
TypeScript

import {requireNativeModule} from 'expo'
import {BackgroundNotificationHandlerPreferences} from './ExpoBackgroundNotificationHandler.types'
const NativeModule = requireNativeModule('ExpoBackgroundNotificationHandler')
export function resetGenericCountAsync(): Promise<void> {
NativeModule.resetGenericCountAsync()
}
export function maybeIncrementMessagesCountAsync(
convoId: string,
): Promise<boolean> {
NativeModule.incrementMessagesCountAsync(convoId)
}
export function maybeDecrementMessagesCountAsync(
convoId: string,
): Promise<boolean> {
NativeModule.decrementMessagesCountAsync(convoId)
}
export function getPrefsAsync(): Promise<BackgroundNotificationHandlerPreferences> {
return NativeModule.getPrefsAsync()
}