@@ -4,34 +4,34 @@ import com.facebook.react.bridge.ReactApplicationContext
44import com.facebook.react.bridge.ReactMethod
55
66class ReactNativeBrownfieldModule (reactContext : ReactApplicationContext ) :
7- NativeReactNativeBrownfieldModuleSpec (reactContext) {
8- companion object {
9- var shouldPopToNative: Boolean = false
10- }
7+ NativeReactNativeBrownfieldModuleSpec (reactContext) {
8+ companion object {
9+ var shouldPopToNative: Boolean = false
10+ }
1111
12- @ReactMethod
13- override fun popToNative (animated : Boolean ) {
14- shouldPopToNative = true
15- onBackPressed()
16- }
12+ @ReactMethod
13+ override fun popToNative (animated : Boolean ) {
14+ shouldPopToNative = true
15+ onBackPressed()
16+ }
1717
18- @ReactMethod
19- override fun setPopGestureRecognizerEnabled (enabled : Boolean ) {
20- shouldPopToNative = enabled
21- }
18+ @ReactMethod
19+ override fun setPopGestureRecognizerEnabled (enabled : Boolean ) {
20+ shouldPopToNative = enabled
21+ }
2222
23- @ReactMethod
24- override fun setHardwareBackButtonEnabled (enabled : Boolean ) {
25- shouldPopToNative = enabled
26- }
23+ @ReactMethod
24+ override fun setHardwareBackButtonEnabled (enabled : Boolean ) {
25+ shouldPopToNative = enabled
26+ }
2727
28- private fun onBackPressed () {
29- reactApplicationContext.currentActivity?.runOnUiThread {
30- reactApplicationContext.currentActivity?.onBackPressed()
28+ private fun onBackPressed () {
29+ reactApplicationContext.currentActivity?.runOnUiThread {
30+ reactApplicationContext.currentActivity?.onBackPressed()
31+ }
3132 }
32- }
3333
34- override fun getName (): String {
35- return " ReactNativeBrownfield"
36- }
34+ override fun getName (): String {
35+ return " ReactNativeBrownfield"
36+ }
3737}
0 commit comments