Skip to content

Commit

Permalink
charging: fix code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
KaffeinatedKat committed Oct 14, 2023
1 parent 402075a commit 8cc7945
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/displayapp/DisplayApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 8cc7945

Please sign in to comment.