From 41fd91f28e19185211206e2b6adacec7021b7699 Mon Sep 17 00:00:00 2001 From: Mike Hardy Date: Mon, 25 Nov 2024 13:57:24 -0500 Subject: [PATCH] chore(android)!: forward-port to new architecture method The method to forward-port to was added in react-native 0.65 so this is breaking but should not actually affect anyone BREAKING CHANGE: minimum required react-native now 0.65 --- .../src/main/java/io/invertase/notifee/NotifeeReactUtils.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/react-native/android/src/main/java/io/invertase/notifee/NotifeeReactUtils.java b/packages/react-native/android/src/main/java/io/invertase/notifee/NotifeeReactUtils.java index c4a28af6..5f882ce4 100644 --- a/packages/react-native/android/src/main/java/io/invertase/notifee/NotifeeReactUtils.java +++ b/packages/react-native/android/src/main/java/io/invertase/notifee/NotifeeReactUtils.java @@ -97,7 +97,8 @@ static void sendEvent(String eventName, WritableMap eventMap) { try { ReactContext reactContext = getReactContext(EventSubscriber.getContext()); - if (reactContext == null || !reactContext.hasActiveCatalystInstance()) { + // hasActiveReactInstance method introduced in react-native 0.65 / August 2021 + if (reactContext == null || !reactContext.hasActiveReactInstance()) { return; }