Skip to content

Commit a851e8f

Browse files
committed
fix #723
1 parent b49d4ea commit a851e8f

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

android/src/main/kotlin/com/jarvan/fluwx/FluwxPlugin.kt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -528,11 +528,13 @@ class FluwxPlugin : FlutterPlugin, MethodCallHandler, ActivityAware,
528528
}
529529

530530
private fun logToFlutter(tag: String?, message: String?) {
531-
fluwxChannel?.invokeMethod(
532-
"wechatLog", mapOf(
533-
"detail" to "$tag : $message"
531+
activityPluginBinding?.activity?.runOnUiThread {
532+
fluwxChannel?.invokeMethod(
533+
"wechatLog", mapOf(
534+
"detail" to "$tag : $message"
535+
)
534536
)
535-
)
537+
}
536538
}
537539

538540

0 commit comments

Comments
 (0)