Merge branch 'main' into hailey/decrement-badge
This commit is contained in:
+1
-1
@@ -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) {
|
||||
|
||||
+9
-8
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user