@onekeyfe/react-native-native-overlay 6.8.0-8 → 6.8.0-9

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.
@@ -191,7 +191,9 @@ internal object ToastFont {
191
191
  /**
192
192
  * Named icons come from the image package's process-wide registry. It is
193
193
  * reached reflectively so this module needs no dependency on it; without the
194
- * registry the icon stays blank.
194
+ * registry the icon stays blank. The image package's consumer R8 rules keep
195
+ * `OneKeyNamedSVG.INSTANCE`, `request` and `cancel` unrenamed for this lookup;
196
+ * its own startup provider sets the cache directory.
195
197
  */
196
198
  private object ToastNamedIcon {
197
199
  private val registry: Any? by lazy {
@@ -205,9 +207,6 @@ private object ToastNamedIcon {
205
207
  private val cancel by lazy {
206
208
  registry?.javaClass?.methods?.firstOrNull { it.name == "cancel" && it.parameterTypes.size == 1 }
207
209
  }
208
- private val setCacheDir by lazy {
209
- registry?.javaClass?.methods?.firstOrNull { it.name == "setCacheDirIfNeeded" }
210
- }
211
210
 
212
211
  fun request(
213
212
  owner: Any,
@@ -227,7 +226,6 @@ private object ToastNamedIcon {
227
226
  }
228
227
  val appContext = context.applicationContext ?: context
229
228
  runCatching {
230
- setCacheDir?.invoke(target, appContext.cacheDir)
231
229
  val callback: (Bitmap?) -> Unit = { bitmap -> mainHandler.post { complete(bitmap) } }
232
230
  method.invoke(target, owner, appContext.assets as AssetManager, name, color, width, height, scale, callback)
233
231
  }.onFailure { complete(null) }
package/docs/SPEC.md CHANGED
@@ -1350,6 +1350,9 @@ above them. Web has no bridge: the DOM renderer subscribes to the store.
1350
1350
  Named icons come from `@onekeyfe/react-native-image`'s native registry,
1351
1351
  reached at runtime (Objective-C runtime on iOS, reflection on Android) so this
1352
1352
  package takes no dependency on it; without the registry an icon stays blank.
1353
+ On Android the lookup is `OneKeyNamedSVG.INSTANCE` plus its `request` (8
1354
+ arguments) and `cancel` methods; the image package's consumer R8 rules keep
1355
+ those names, since release app builds minify and would otherwise rename them.
1353
1356
  Web draws an SVG `<use>` of the `href` the caller supplies.
1354
1357
 
1355
1358
  ### Platform behaviour
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onekeyfe/react-native-native-overlay",
3
- "version": "6.8.0-8",
3
+ "version": "6.8.0-9",
4
4
  "description": "Native and Web overlay hosts with ordered levels, page scope and Fabric measurement",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",