fix(core): android fix for entry cleared too late

This commit is contained in:
Martin Guillon
2022-01-30 14:18:53 +01:00
parent eca1a21c4b
commit 663ab77a7d

View File

@@ -501,8 +501,9 @@ export class Frame extends FrameBase {
const manager: androidx.fragment.app.FragmentManager = this._getFragmentManager();
const transaction = manager.beginTransaction();
transaction.remove(removed.fragment);
transaction.commitNowAllowingStateLoss();
// clear entry before commit because commit now will release the fragment right away
_clearEntry(removed);
transaction.commitNowAllowingStateLoss();
}
removed.fragment = null;