try to fix crash

This commit is contained in:
Milos Kozak 2018-06-13 10:41:15 +02:00
parent d4ed6539d8
commit 4d2e166620

View file

@ -590,6 +590,10 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
String units = MainApp.getConfigBuilder().getProfileUnits(); String units = MainApp.getConfigBuilder().getProfileUnits();
FragmentManager manager = getFragmentManager(); FragmentManager manager = getFragmentManager();
// try to fix https://fabric.io/nightscout3/android/apps/info.nightscout.androidaps/issues/5aca7a1536c7b23527eb4be7?time=last-seven-days
// https://stackoverflow.com/questions/14860239/checking-if-state-is-saved-before-committing-a-fragmenttransaction
if (manager.isStateSaved())
return;
switch (v.getId()) { switch (v.getId()) {
case R.id.overview_accepttempbutton: case R.id.overview_accepttempbutton:
onClickAcceptTemp(); onClickAcceptTemp();