Fix possible IllegalStateException
This commit is contained in:
parent
898d9224e0
commit
9f0bda924d
2 changed files with 2 additions and 2 deletions
|
@ -468,7 +468,7 @@ public abstract class OsmandPlugin {
|
||||||
FragmentManager fm = mapActivity.getSupportFragmentManager();
|
FragmentManager fm = mapActivity.getSupportFragmentManager();
|
||||||
Fragment fragment = fm.findFragmentByTag(fragmentData.tag);
|
Fragment fragment = fm.findFragmentByTag(fragmentData.tag);
|
||||||
if (fragment != null) {
|
if (fragment != null) {
|
||||||
fm.beginTransaction().remove(fragment).commit();
|
fm.beginTransaction().remove(fragment).commitAllowingStateLoss();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1004,7 +1004,7 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks, IRouteInfo
|
||||||
new TransactionBuilder(mapActivity.getSupportFragmentManager(), settings, mapActivity);
|
new TransactionBuilder(mapActivity.getSupportFragmentManager(), settings, mapActivity);
|
||||||
builder.addFragmentsData(fragmentsData)
|
builder.addFragmentsData(fragmentsData)
|
||||||
.addFragmentsData(OsmandPlugin.getPluginsCardsList())
|
.addFragmentsData(OsmandPlugin.getPluginsCardsList())
|
||||||
.getFragmentTransaction().commit();
|
.getFragmentTransaction().commitAllowingStateLoss();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void removeFragment(String tag) {
|
private void removeFragment(String tag) {
|
||||||
|
|
Loading…
Reference in a new issue