mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-18 22:01:42 +08:00
use replace when navigating with clearHistory
This commit is contained in:
@ -439,7 +439,11 @@ export class Frame extends FrameBase {
|
||||
//transaction.setTransition(androidx.fragment.app.FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
|
||||
}
|
||||
|
||||
transaction.add(this.containerViewId, newFragment, newFragmentTag);
|
||||
if (clearHistory) {
|
||||
transaction.replace(this.containerViewId, newFragment, newFragmentTag);
|
||||
} else {
|
||||
transaction.add(this.containerViewId, newFragment, newFragmentTag);
|
||||
}
|
||||
transaction.commitAllowingStateLoss();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user