omikit-plugin 3.2.40 → 3.2.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -753,11 +753,15 @@ class OmikitPluginModule(reactContext: ReactApplicationContext?) :
|
|
|
753
753
|
}
|
|
754
754
|
|
|
755
755
|
fun sendEvent(eventName: String?, params: Any?) {
|
|
756
|
+
if (eventName == null) {
|
|
757
|
+
Log.e("OmikitPlugin", "eventName is null. Event cannot be emitted.")
|
|
758
|
+
return
|
|
759
|
+
}
|
|
756
760
|
if (currentActivity != null) {
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
+
currentActivity!!.runOnUiThread {
|
|
762
|
+
reactApplicationContext.getJSModule(RCTNativeAppEventEmitter::class.java)
|
|
763
|
+
.emit(eventName, params)
|
|
764
|
+
}
|
|
761
765
|
}
|
|
762
766
|
}
|
|
763
767
|
|