Default covers + optimisations

This commit is contained in:
jpirnay
2026-05-19 12:34:54 +02:00
parent d2f660ea64
commit 5fec0e0210
10 changed files with 177 additions and 8 deletions
+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();