mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 04:41:36 +08:00
fix: handle fake attach after FragMgr is destroyed (#8200)
This commit is contained in:

committed by
GitHub

parent
76442f433e
commit
d1858f81b7
@ -385,7 +385,6 @@ export class BottomNavigation extends TabNavigationBase {
|
||||
|
||||
_onAttachedToWindow(): void {
|
||||
super._onAttachedToWindow();
|
||||
this._attachedToWindow = true;
|
||||
|
||||
// _onAttachedToWindow called from OS again after it was detach
|
||||
// TODO: Consider testing and removing it when update to androidx.fragment:1.2.0
|
||||
@ -393,6 +392,7 @@ export class BottomNavigation extends TabNavigationBase {
|
||||
return;
|
||||
}
|
||||
|
||||
this._attachedToWindow = true;
|
||||
this.changeTab(this.selectedIndex);
|
||||
}
|
||||
|
||||
|
@ -150,7 +150,6 @@ export class Frame extends FrameBase {
|
||||
|
||||
_onAttachedToWindow(): void {
|
||||
super._onAttachedToWindow();
|
||||
this._attachedToWindow = true;
|
||||
|
||||
// _onAttachedToWindow called from OS again after it was detach
|
||||
// TODO: Consider testing and removing it when update to androidx.fragment:1.2.0
|
||||
@ -158,6 +157,7 @@ export class Frame extends FrameBase {
|
||||
return;
|
||||
}
|
||||
|
||||
this._attachedToWindow = true;
|
||||
this._processNextNavigationEntry();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user