Merge pull request #243 from jpirnay/fi-rebuildcovers

fix: rebuild covers
This commit is contained in:
jpirnay
2026-05-19 13:49:26 +02:00
committed by GitHub
10 changed files with 232 additions and 32 deletions
+3 -1
View File
@@ -54,7 +54,9 @@ void MdReaderActivity::onEnter() {
auto fileName = filePath.substr(filePath.rfind('/') + 1);
APP_STATE.openEpubPath = filePath;
APP_STATE.saveToFile();
RECENT_BOOKS.addBook(filePath, fileName, "", "", ReaderActivity::sidecarCoverPath(filePath));
const std::string txtSidecar = ReaderActivity::sidecarCoverPath(filePath);
const std::string txtCover = txtSidecar.empty() ? txt->getThumbBmpPath() : txtSidecar;
RECENT_BOOKS.addBook(filePath, fileName, "", "", txtCover);
requestUpdate();
}
+3 -1
View File
@@ -118,7 +118,9 @@ void TxtReaderActivity::onEnter() {
auto fileName = filePath.substr(filePath.rfind('/') + 1);
APP_STATE.openEpubPath = filePath;
APP_STATE.saveToFile();
RECENT_BOOKS.addBook(filePath, fileName, "", "", ReaderActivity::sidecarCoverPath(filePath));
const std::string txtSidecar = ReaderActivity::sidecarCoverPath(filePath);
const std::string txtCover = txtSidecar.empty() ? txt->getThumbBmpPath() : txtSidecar;
RECENT_BOOKS.addBook(filePath, fileName, "", "", txtCover);
// Trigger first update
requestUpdate();