Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/systemtask/SystemTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ void SystemTask::UpdateMotion() {
}
}
if (settingsController.isWakeUpModeOn(Pinetime::Controllers::Settings::WakeUpMode::LowerWrist) && state == SystemTaskState::Running &&
motionController.ShouldLowerSleep()) {
motionController.ShouldLowerSleep() && (settingsController.GetNotificationStatus() != Controllers::Settings::Notification::Sleep)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move into the if block above instead (it already checks the condition)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which line do you mean? Could you clarify?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

L458 already checks (settingsController.GetNotificationStatus() != Controllers::Settings::Notification::Sleep)
So the lower wrist check can move to L465 and the extra check of the notification status is not needed

GoToSleep();
}
}
Expand Down