mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-19 14:20:22 +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.setTransition(androidx.fragment.app.FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (clearHistory) {
|
||||||
|
transaction.replace(this.containerViewId, newFragment, newFragmentTag);
|
||||||
|
} else {
|
||||||
transaction.add(this.containerViewId, newFragment, newFragmentTag);
|
transaction.add(this.containerViewId, newFragment, newFragmentTag);
|
||||||
|
}
|
||||||
transaction.commitAllowingStateLoss();
|
transaction.commitAllowingStateLoss();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user