From e4dafb0ea56c89c212c3ebe7e9c7eb2f60bf8c06 Mon Sep 17 00:00:00 2001 From: davidliu Date: Fri, 21 Jun 2024 12:13:39 +0900 Subject: [PATCH] fix: Handle invalidate for react-native 0.74+ React-Native no longer calls onCatalystInstanceDestroy in 0.74+. --- .../src/main/java/com/oney/WebRTCModule/WebRTCModule.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/android/src/main/java/com/oney/WebRTCModule/WebRTCModule.java b/android/src/main/java/com/oney/WebRTCModule/WebRTCModule.java index f32bac9c9..cda45ba12 100644 --- a/android/src/main/java/com/oney/WebRTCModule/WebRTCModule.java +++ b/android/src/main/java/com/oney/WebRTCModule/WebRTCModule.java @@ -116,6 +116,11 @@ public String getName() { return "WebRTCModule"; } + @Override + public void invalidate() { + onCatalystInstanceDestroy(); + } + @Override public void onCatalystInstanceDestroy() { if (mAudioDeviceModule != null) {