@onekeyfe/react-native-bottom-tabs 6.7.0-44 → 6.7.0-46

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.
@@ -543,11 +543,16 @@ class BottomTabsView(context: Context) : LinearLayout(context) {
543
543
  return
544
544
  }
545
545
  bottomNavigation.itemIconSize = size
546
- // Icons are rasterized at the icon size, so reload them for the new size.
546
+ // Icons are rasterized at the icon size: drop cached and in-flight requests,
547
+ // then reload each item's currently active source at the new size.
547
548
  drawableCache.clear()
548
- iconSources.forEach { (index, source) ->
549
+ iconRequestTokens.values.forEach { OneKeyNamedSVG.cancel(it) }
550
+ iconRequestTokens.clear()
551
+ selectedIconRequestTokens.values.forEach { OneKeyNamedSVG.cancel(it) }
552
+ selectedIconRequestTokens.clear()
553
+ items.indices.forEach { index ->
549
554
  bottomNavigation.menu.findItem(index)?.let { menuItem ->
550
- getDrawable(index, source) { menuItem.icon = it }
555
+ applyMenuItemIcon(index, menuItem)
551
556
  }
552
557
  }
553
558
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onekeyfe/react-native-bottom-tabs",
3
- "version": "6.7.0-44",
3
+ "version": "6.7.0-46",
4
4
  "description": "Native bottom tabs (tab bar + scene container) for React Native on iOS and Android",
5
5
  "source": "./src/index.tsx",
6
6
  "main": "./lib/module/index.js",