Merge pull request #2332 from swissalpine/patch-1

Fix for mixed up bage_warn, bage_urgent for Combo in Statuslights
This commit is contained in:
Milos Kozak 2020-01-25 20:41:41 +01:00 committed by GitHub
commit 09f0f639b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -41,7 +41,7 @@ class StatuslightHandler {
R.string.key_statuslights_bat_warning, 22.0, R.string.key_statuslights_bat_warning, 22.0,
batteryView, "BAT", batteryLevel); batteryView, "BAT", batteryLevel);
} else { } else {
applyStatuslight("bage", CareportalEvent.PUMPBATTERYCHANGE, batteryView, "BAT", 504, 240); applyStatuslight("bage", CareportalEvent.PUMPBATTERYCHANGE, batteryView, "BAT", 224, 336);
} }
} }
@ -116,12 +116,12 @@ class StatuslightHandler {
batteryView, "BAT ", pump.getBatteryLevel()); batteryView, "BAT ", pump.getBatteryLevel());
} else { } else {
handleAge("bage", CareportalEvent.PUMPBATTERYCHANGE, batteryView, "BAT ", handleAge("bage", CareportalEvent.PUMPBATTERYCHANGE, batteryView, "BAT ",
336, 240); 224, 336);
} }
} }
void handleAge(String nsSettingPlugin, String eventName, TextView view, String text, void handleAge(String nsSettingPlugin, String eventName, TextView view, String text,
int defaultUrgentThreshold, int defaultWarnThreshold) { int defaultWarnThreshold, int defaultUrgentThreshold) {
NSSettingsStatus nsSettings = new NSSettingsStatus().getInstance(); NSSettingsStatus nsSettings = new NSSettingsStatus().getInstance();
if (view != null) { if (view != null) {