Review comments

This commit is contained in:
jpirnay
2026-04-14 19:05:42 +02:00
parent f9f856f961
commit f2207cbb11
4 changed files with 14 additions and 5 deletions
+9 -2
View File
@@ -111,8 +111,15 @@ class BookmarkStore {
}
}
ok = ok && f.close();
if (!ok) {
bool closeOk = false;
if (ok) {
closeOk = f.close();
if (!closeOk) {
LOG_ERR("BKM", "Failed to close bookmarks file");
return;
}
} else {
f.close();
LOG_ERR("BKM", "Failed while writing bookmarks");
return;
}
@@ -26,7 +26,6 @@ class EpubReaderMenuActivity final : public MenuListActivity {
GO_HOME,
PULL_REMOTE,
PUSH_LOCAL,
SYNC,
STARRED_PAGES,
STAR_PAGE,
DELETE_CACHE
+3 -1
View File
@@ -153,7 +153,9 @@ void TxtReaderActivity::loop() {
// Star page toggle via short power button press
if (SETTINGS.shortPwrBtn == CrossPointSettings::SHORT_PWRBTN::STAR_PAGE &&
mappedInput.wasReleased(MappedInputManager::Button::Power)) {
bookmarkStore.toggle(0, static_cast<uint16_t>(currentPage));
if (currentPage >= 0) {
bookmarkStore.toggle(0, static_cast<uint16_t>(currentPage));
}
requestUpdate();
return;
}
+2 -1
View File
@@ -866,7 +866,8 @@ void BaseTheme::drawStatusBar(GfxRenderer& renderer, const float bookProgress, c
// No progress text, place star at right edge
starX = renderer.getScreenWidth() - metrics.statusBarHorizontalMargin - orientedMarginRight - starWidth;
}
renderer.drawText(SMALL_FONT_ID, starX, textY + textYOffset, "*");
const int starY = title.empty() ? textY : (textY + textYOffset);
renderer.drawText(SMALL_FONT_ID, starX, starY, "*");
}
}