Merge pull request #846 from swissalpine/patch-1

Overview fragment: Show "Disconnected" when disconnected not "Suspended"
This commit is contained in:
Milos Kozak 2018-04-05 23:22:44 +02:00 committed by GitHub
commit f2a7876466
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View file

@ -1051,6 +1051,10 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
apsModeView.setBackgroundColor(MainApp.sResources.getColor(R.color.looppumpsuspended));
apsModeView.setText(String.format(MainApp.sResources.getString(R.string.loopsuperbolusfor), activeloop.minutesToEndOfSuspend()));
apsModeView.setTextColor(Color.WHITE);
} else if (activeloop != null && activeloop.isEnabled(activeloop.getType()) && activeloop.isDisconnected()) {
apsModeView.setBackgroundColor(MainApp.sResources.getColor(R.color.looppumpsuspended));
apsModeView.setText(String.format(MainApp.sResources.getString(R.string.loopdisconnectedfor), activeloop.minutesToEndOfSuspend()));
apsModeView.setTextColor(Color.WHITE);
} else if (activeloop != null && activeloop.isEnabled(activeloop.getType()) && activeloop.isSuspended()) {
apsModeView.setBackgroundColor(MainApp.sResources.getColor(R.color.looppumpsuspended));
apsModeView.setText(String.format(MainApp.sResources.getString(R.string.loopsuspendedfor), activeloop.minutesToEndOfSuspend()));

View file

@ -1,4 +1,4 @@
<resources>
<resources>
<string name="treatmentssafety_title">Tratments safety</string>
<string name="treatmentssafety_maxbolus_title">Max allowed bolus [U]</string>
<string name="treatmentssafety_maxcarbs_title">Max allowed carbs [g]</string>
@ -996,5 +996,5 @@
<string name="smbnotallowedinopenloopmode">SMB not allowed in open loop mode</string>
<string name="food_short">Food</string>
<string name="iobcobcalculator" translatable="false">IobCobCalculator</string>
<string name="loopdisconnectedfor">Disconnected (%d m)</string>
</resources>