mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 12:57:42 +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 {
|
_onAttachedToWindow(): void {
|
||||||
super._onAttachedToWindow();
|
super._onAttachedToWindow();
|
||||||
this._attachedToWindow = true;
|
|
||||||
|
|
||||||
// _onAttachedToWindow called from OS again after it was detach
|
// _onAttachedToWindow called from OS again after it was detach
|
||||||
// TODO: Consider testing and removing it when update to androidx.fragment:1.2.0
|
// TODO: Consider testing and removing it when update to androidx.fragment:1.2.0
|
||||||
@ -393,6 +392,7 @@ export class BottomNavigation extends TabNavigationBase {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this._attachedToWindow = true;
|
||||||
this.changeTab(this.selectedIndex);
|
this.changeTab(this.selectedIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -150,7 +150,6 @@ export class Frame extends FrameBase {
|
|||||||
|
|
||||||
_onAttachedToWindow(): void {
|
_onAttachedToWindow(): void {
|
||||||
super._onAttachedToWindow();
|
super._onAttachedToWindow();
|
||||||
this._attachedToWindow = true;
|
|
||||||
|
|
||||||
// _onAttachedToWindow called from OS again after it was detach
|
// _onAttachedToWindow called from OS again after it was detach
|
||||||
// TODO: Consider testing and removing it when update to androidx.fragment:1.2.0
|
// TODO: Consider testing and removing it when update to androidx.fragment:1.2.0
|
||||||
@ -158,6 +157,7 @@ export class Frame extends FrameBase {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this._attachedToWindow = true;
|
||||||
this._processNextNavigationEntry();
|
this._processNextNavigationEntry();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user