expo-dev-menu-interface 1.9.0 → 1.9.1

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,7 @@
1
1
  apply plugin: 'com.android.library'
2
2
 
3
3
  group = 'host.exp.exponent'
4
- version = '1.9.0'
4
+ version = '1.9.1'
5
5
 
6
6
  def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
7
7
  apply from: expoModulesCorePlugin
@@ -13,7 +13,7 @@ android {
13
13
  namespace "expo.interfaces.devmenu"
14
14
  defaultConfig {
15
15
  versionCode 6
16
- versionName '1.9.0'
16
+ versionName '1.9.1'
17
17
  }
18
18
  }
19
19
 
@@ -17,26 +17,18 @@ import java.lang.reflect.Field
17
17
  * An abstract wrapper to host [ReactNativeHost] and [ReactHost],
18
18
  * so that call-sites do not have to handle the difference between legacy bridge and bridgeless mode.
19
19
  */
20
- class ReactHostWrapper(reactNativeHost: ReactNativeHost, reactHost: ReactHost?) {
20
+ class ReactHostWrapper(reactNativeHost: ReactNativeHost, reactHostProvider: () -> ReactHost?) {
21
21
  lateinit var reactNativeHost: ReactNativeHost
22
22
  lateinit var reactHost: ReactHost
23
23
 
24
24
  init {
25
25
  if (ReactFeatureFlags.enableBridgelessArchitecture) {
26
- this.reactHost = requireNotNull(reactHost)
26
+ this.reactHost = requireNotNull(reactHostProvider())
27
27
  } else {
28
28
  this.reactNativeHost = reactNativeHost
29
29
  }
30
30
  }
31
31
 
32
- override fun hashCode(): Int {
33
- return if (isBridgelessMode) {
34
- reactHost.hashCode()
35
- } else {
36
- reactNativeHost.hashCode()
37
- }
38
- }
39
-
40
32
  val currentReactContext: ReactContext?
41
33
  get() {
42
34
  return if (isBridgelessMode) {
@@ -123,4 +115,24 @@ class ReactHostWrapper(reactNativeHost: ReactNativeHost, reactHost: ReactHost?)
123
115
  reactNativeHost.clear()
124
116
  }
125
117
  }
118
+
119
+ override fun hashCode(): Int {
120
+ return if (isBridgelessMode) {
121
+ reactHost.hashCode()
122
+ } else {
123
+ reactNativeHost.hashCode()
124
+ }
125
+ }
126
+
127
+ override fun equals(other: Any?): Boolean {
128
+ if (this === other) return true
129
+ if (javaClass != other?.javaClass) return false
130
+
131
+ other as ReactHostWrapper
132
+
133
+ if (reactNativeHost != other.reactNativeHost) return false
134
+ if (reactHost != other.reactHost) return false
135
+
136
+ return true
137
+ }
126
138
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-dev-menu-interface",
3
- "version": "1.9.0",
3
+ "version": "1.9.1",
4
4
  "description": "Interface for expo-dev-menu",
5
5
  "main": "index.js",
6
6
  "keywords": [
@@ -25,5 +25,5 @@
25
25
  "peerDependencies": {
26
26
  "expo": "*"
27
27
  },
28
- "gitHead": "7c7d2362fff23bec26cd145ed34edd9c403551bd"
28
+ "gitHead": "c0899e56c5be08b0142f06f05aa7bac8d6bc18b8"
29
29
  }