diff --git a/src/BookmarkStore.h b/src/BookmarkStore.h index 6121d8a0..e1966b23 100644 --- a/src/BookmarkStore.h +++ b/src/BookmarkStore.h @@ -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; } diff --git a/src/activities/reader/EpubReaderMenuActivity.h b/src/activities/reader/EpubReaderMenuActivity.h index 2cf79c65..d5fc72c9 100644 --- a/src/activities/reader/EpubReaderMenuActivity.h +++ b/src/activities/reader/EpubReaderMenuActivity.h @@ -26,7 +26,6 @@ class EpubReaderMenuActivity final : public MenuListActivity { GO_HOME, PULL_REMOTE, PUSH_LOCAL, - SYNC, STARRED_PAGES, STAR_PAGE, DELETE_CACHE diff --git a/src/activities/reader/TxtReaderActivity.cpp b/src/activities/reader/TxtReaderActivity.cpp index 6a2ec736..35b95330 100644 --- a/src/activities/reader/TxtReaderActivity.cpp +++ b/src/activities/reader/TxtReaderActivity.cpp @@ -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(currentPage)); + if (currentPage >= 0) { + bookmarkStore.toggle(0, static_cast(currentPage)); + } requestUpdate(); return; } diff --git a/src/components/themes/BaseTheme.cpp b/src/components/themes/BaseTheme.cpp index ca6fcbdc..4edfb5b5 100644 --- a/src/components/themes/BaseTheme.cpp +++ b/src/components/themes/BaseTheme.cpp @@ -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, "*"); } }