File tree Expand file tree Collapse file tree 4 files changed +19
-5
lines changed
packages/react-native-bottom-tabs/android/src Expand file tree Collapse file tree 4 files changed +19
-5
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " react-native-bottom-tabs " : patch
3+ ---
4+
5+ fix: propery destroy image loader on Android
Original file line number Diff line number Diff line change @@ -384,6 +384,10 @@ class ReactBottomNavigationView(context: Context) : LinearLayout(context) {
384384 updateTextAppearance()
385385 }
386386
387+ fun onDropViewInstance () {
388+ imageLoader.shutdown()
389+ }
390+
387391 private fun updateTextAppearance () {
388392 if (fontSize != null || fontFamily != null || fontWeight != null ) {
389393 val menuView = bottomNavigation.getChildAt(0 ) as ? ViewGroup ? : return
@@ -455,9 +459,4 @@ class ReactBottomNavigationView(context: Context) : LinearLayout(context) {
455459 updateItems(items)
456460 uiModeConfiguration = newConfig?.uiMode ? : uiModeConfiguration
457461 }
458-
459- override fun onDetachedFromWindow () {
460- super .onDetachedFromWindow()
461- imageLoader.shutdown()
462- }
463462}
Original file line number Diff line number Diff line change @@ -43,6 +43,11 @@ class RCTTabViewManager(context: ReactApplicationContext) :
4343
4444 }
4545
46+ override fun onDropViewInstance (view : ReactBottomNavigationView ) {
47+ super .onDropViewInstance(view)
48+ view.onDropViewInstance()
49+ }
50+
4651 override fun getName (): String {
4752 return tabViewImpl.getName()
4853 }
Original file line number Diff line number Diff line change @@ -39,6 +39,11 @@ class RCTTabViewManager(context: ReactApplicationContext) : ViewGroupManager<Rea
3939 return view
4040 }
4141
42+ override fun onDropViewInstance (view : ReactBottomNavigationView ) {
43+ super .onDropViewInstance(view)
44+ view.onDropViewInstance()
45+ }
46+
4247 override fun getChildCount (parent : ReactBottomNavigationView ): Int {
4348 return tabViewImpl.getChildCount(parent)
4449 }
You can’t perform that action at this time.
0 commit comments