mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2026-02-04 22:57:50 +03:00
chore(SleepActivity): use switch-case statement
This commit is contained in:
parent
da4d3b5ea5
commit
17aa6c8de9
@ -16,19 +16,16 @@ void SleepActivity::onEnter() {
|
|||||||
Activity::onEnter();
|
Activity::onEnter();
|
||||||
renderPopup("Entering Sleep...");
|
renderPopup("Entering Sleep...");
|
||||||
|
|
||||||
if (SETTINGS.sleepScreen == CrossPointSettings::SLEEP_SCREEN_MODE::BLANK) {
|
switch (SETTINGS.sleepScreen) {
|
||||||
return renderBlankSleepScreen();
|
case (CrossPointSettings::SLEEP_SCREEN_MODE::BLANK):
|
||||||
|
return renderBlankSleepScreen();
|
||||||
|
case (CrossPointSettings::SLEEP_SCREEN_MODE::CUSTOM):
|
||||||
|
return renderCustomSleepScreen();
|
||||||
|
case (CrossPointSettings::SLEEP_SCREEN_MODE::COVER):
|
||||||
|
return renderCoverSleepScreen();
|
||||||
|
default:
|
||||||
|
return renderDefaultSleepScreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SETTINGS.sleepScreen == CrossPointSettings::SLEEP_SCREEN_MODE::CUSTOM) {
|
|
||||||
return renderCustomSleepScreen();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (SETTINGS.sleepScreen == CrossPointSettings::SLEEP_SCREEN_MODE::COVER) {
|
|
||||||
return renderCoverSleepScreen();
|
|
||||||
}
|
|
||||||
|
|
||||||
renderDefaultSleepScreen();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SleepActivity::renderPopup(const char* message) const {
|
void SleepActivity::renderPopup(const char* message) const {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user