charging: fix code formatting

This commit is contained in:
John Crawford 2023-10-13 22:51:11 -06:00
parent 402075ac73
commit 8cc7945e00

View file

@ -362,16 +362,16 @@ void DisplayApp::Refresh() {
break;
case Messages::OnChargingEvent:
RestoreBrightness();
if (batteryController.IsCharging() && currentApp == Apps::Clock) {
// Open the battery app if on the clock screen
LoadNewScreen(Apps::BatteryInfo, DisplayApp::FullRefreshDirections::None);
} else if (!batteryController.IsCharging() && currentApp == Apps::BatteryInfo) {
// Close the battery app after being unplugged
LoadNewScreen(Apps::Clock, DisplayApp::FullRefreshDirections::None);
} else {
// Vibrate normally otherwise as to not close any open app
motorController.RunForDuration(15);
}
if (batteryController.IsCharging() && currentApp == Apps::Clock) {
// Open the battery app if on the clock screen
LoadNewScreen(Apps::BatteryInfo, DisplayApp::FullRefreshDirections::None);
} else if (!batteryController.IsCharging() && currentApp == Apps::BatteryInfo) {
// Close the battery app after being unplugged
LoadNewScreen(Apps::Clock, DisplayApp::FullRefreshDirections::None);
} else {
// Vibrate normally otherwise as to not close any open app
motorController.RunForDuration(15);
}
break;
}
}