File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -402,7 +402,10 @@ export class BottomNavigation extends TabNavigationBase {
402402 // _onAttachedToWindow called from OS again after it was detach
403403 // still happens with androidx.fragment:1.3.2
404404 const activity = Application . android . foregroundActivity ;
405- if ( ( this . _manager && this . _manager . isDestroyed ( ) ) || ! activity . getLifecycle ?.( ) . getCurrentState ( ) . isAtLeast ( androidx . lifecycle . Lifecycle . State . STARTED ) ) {
405+ if (
406+ ( this . _manager && this . _manager . isDestroyed ( ) ) ||
407+ ( activity instanceof androidx . fragment . app . FragmentActivity && ! activity . getLifecycle ( ) . getCurrentState ( ) . isAtLeast ( androidx . lifecycle . Lifecycle . State . STARTED ) )
408+ ) {
406409 return ;
407410 }
408411
Original file line number Diff line number Diff line change @@ -513,7 +513,10 @@ export class Tabs extends TabsBase {
513513 // _onAttachedToWindow called from OS again after it was detach
514514 // still happens with androidx.fragment:1.3.2
515515 const activity = Application . android . foregroundActivity ;
516- if ( ( this . _manager && this . _manager . isDestroyed ( ) ) || ! activity . getLifecycle ?.( ) . getCurrentState ( ) . isAtLeast ( androidx . lifecycle . Lifecycle . State . STARTED ) ) {
516+ if (
517+ ( this . _manager && this . _manager . isDestroyed ( ) ) ||
518+ ( activity instanceof androidx . fragment . app . FragmentActivity && ! activity . getLifecycle ( ) . getCurrentState ( ) . isAtLeast ( androidx . lifecycle . Lifecycle . State . STARTED ) )
519+ ) {
517520 return ;
518521 }
519522
You can’t perform that action at this time.
0 commit comments