Add missed braces

This commit is contained in:
jpirnay
2026-05-21 21:21:49 +02:00
parent 60235da75e
commit d1fb82f776
2 changed files with 8 additions and 5 deletions
+4 -3
View File
@@ -916,7 +916,7 @@ void TxtReaderActivity::onButtonAction(const CrossPointSettings::BUTTON_ACTION a
requestUpdate();
}
break;
case BA::BTN_PAGE_FORWARD_10:
case BA::BTN_PAGE_FORWARD_10: {
const int prevPage = currentPage;
currentPage += 10;
clampPage();
@@ -925,16 +925,17 @@ void TxtReaderActivity::onButtonAction(const CrossPointSettings::BUTTON_ACTION a
}
requestUpdate();
break;
case BA::BTN_PAGE_BACK_10:
}
case BA::BTN_PAGE_BACK_10: {
const int prevPage = currentPage;
currentPage -= 10;
clampPage();
if (currentPage != prevPage) {
globalReadingSessionTracker().onPageTurn();
}
requestUpdate();
break;
}
case BA::BTN_STAR_PAGE:
bookmarkStore.toggle(0, static_cast<uint16_t>(currentPage));
requestUpdate();
+4 -2
View File
@@ -534,7 +534,7 @@ void XtcReaderActivity::onButtonAction(const CrossPointSettings::BUTTON_ACTION a
requestUpdate();
}
break;
case BA::BTN_PAGE_FORWARD_10:
case BA::BTN_PAGE_FORWARD_10: {
const uint32_t prevPage = currentPage;
currentPage = (currentPage + 10 < pageCount) ? currentPage + 10 : pageCount - 1;
if (currentPage != prevPage) {
@@ -542,7 +542,8 @@ void XtcReaderActivity::onButtonAction(const CrossPointSettings::BUTTON_ACTION a
}
requestUpdate();
break;
case BA::BTN_PAGE_BACK_10:
}
case BA::BTN_PAGE_BACK_10: {
const uint32_t prevPage = currentPage;
currentPage = (currentPage >= 10) ? currentPage - 10 : 0;
if (currentPage != prevPage) {
@@ -550,6 +551,7 @@ void XtcReaderActivity::onButtonAction(const CrossPointSettings::BUTTON_ACTION a
}
requestUpdate();
break;
}
case BA::BTN_NEXT_SECTION:
if (xtc->hasChapters()) {
const auto& chapters = xtc->getChapters();