react-native-debug-toolkit 0.4.2 → 0.4.3

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.
@@ -1,7 +1,6 @@
1
1
  package com.reactnative.debuglibs;
2
2
 
3
3
  import android.app.Application;
4
- import android.widget.Toast;
5
4
  import androidx.annotation.NonNull;
6
5
 
7
6
  import com.facebook.react.bridge.ReactApplicationContext;
@@ -56,15 +55,21 @@ public class RNDebugLibsModule extends ReactContextBaseJavaModule {
56
55
 
57
56
  @ReactMethod
58
57
  public void showDoraemonKit() {
59
- DoKit.showToolPanel();
60
- DoKit.show();
61
-
58
+ reactContext.runOnUiQueueThread(new Runnable() {
59
+ @Override
60
+ public void run() {
61
+ DoKit.show();
62
+ }
63
+ });
62
64
  }
63
65
 
64
66
  @ReactMethod
65
67
  public void hideDoraemonKit() {
66
- // Toast.makeText(reactContext, "hideDoraemonKit被调用", Toast.LENGTH_SHORT).show();
67
- // DoKit.hideToolPanel();
68
- DoKit.hide();
68
+ reactContext.runOnUiQueueThread(new Runnable() {
69
+ @Override
70
+ public void run() {
71
+ DoKit.hide();
72
+ }
73
+ });
69
74
  }
70
75
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-debug-toolkit",
3
- "version": "0.4.2",
3
+ "version": "0.4.3",
4
4
  "description": "A simple yet powerful debugging toolkit for React Native with a convenient floating UI for development",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",