mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-02-10 17:23:42 +08:00
Use commitAllowingStateLoss instead of commit (#24)
This fixes a crash I saw in production on Android `java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState`. The fix is based on the comment here https://stackoverflow.com/questions/7575921/illegalstateexception-can-not-perform-this-action-after-onsaveinstancestate-wit. The crash stopped happening since deploying this fix. Fixes #20
This commit is contained in:
committed by
Krzysztof Magiera
parent
29022684cc
commit
ece5b6ef6a
@@ -96,7 +96,7 @@ public class ScreenContainer extends ViewGroup {
|
||||
|
||||
private void tryCommitTransaction() {
|
||||
if (mCurrentTransaction != null) {
|
||||
mCurrentTransaction.commit();
|
||||
mCurrentTransaction.commitAllowingStateLoss();
|
||||
mCurrentTransaction = null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user