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 {
402
402
// _onAttachedToWindow called from OS again after it was detach
403
403
// still happens with androidx.fragment:1.3.2
404
404
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
+ ) {
406
409
return ;
407
410
}
408
411
Original file line number Diff line number Diff line change @@ -513,7 +513,10 @@ export class Tabs extends TabsBase {
513
513
// _onAttachedToWindow called from OS again after it was detach
514
514
// still happens with androidx.fragment:1.3.2
515
515
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
+ ) {
517
520
return ;
518
521
}
519
522
You can’t perform that action at this time.
0 commit comments