Merge branch 'main' into hailey/decrement-badge

This commit is contained in:
Hailey
2024-07-12 16:04:59 -07:00
226 changed files with 22600 additions and 13389 deletions
@@ -17,7 +17,7 @@ enum class NotificationType(val type: String) {
class BackgroundNotificationHandler(
private val context: Context,
private val notifInterface: BackgroundNotificationHandlerInterface
private val notifInterface: BackgroundNotificationHandlerInterface,
) {
fun handleMessage(remoteMessage: RemoteMessage) {
if (ExpoBackgroundNotificationHandlerModule.isForegrounded) {
@@ -20,8 +20,9 @@ class ExpoBackgroundNotificationHandlerModule : Module() {
var isForegrounded = false
}
override fun definition() = ModuleDefinition {
Name("ExpoBackgroundNotificationHandler")
override fun definition() =
ModuleDefinition {
Name("ExpoBackgroundNotificationHandler")
OnCreate {
val context = appContext.reactContext ?: throw Error("Context is null")
@@ -33,13 +34,13 @@ class ExpoBackgroundNotificationHandlerModule : Module() {
}
}
OnActivityEntersForeground {
isForegrounded = true
}
OnActivityEntersForeground {
isForegrounded = true
}
OnActivityEntersBackground {
isForegrounded = false
}
OnActivityEntersBackground {
isForegrounded = false
}
AsyncFunction("getPrefsAsync") {
val context = appContext.reactContext ?: throw Error("Context is null")