Review comments
This commit is contained in:
+9
-2
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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, "*");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user