Review fixes

This commit is contained in:
jpirnay
2026-03-07 19:33:02 +01:00
parent a6f61fb0d0
commit 2abcf9bc68
3 changed files with 22 additions and 8 deletions
+2 -2
View File
@@ -134,7 +134,7 @@ bool RecentBooksStore::loadFromBinaryFile() {
std::string title, author;
serialization::readString(inputFile, title);
serialization::readString(inputFile, author);
recentBooks.push_back({path, title, author, ""});
recentBooks.push_back({path, title, author, "", ""});
} else {
recentBooks.push_back(book);
}
@@ -160,7 +160,7 @@ bool RecentBooksStore::loadFromBinaryFile() {
continue;
}
recentBooks.push_back({path, title, author, coverBmpPath});
recentBooks.push_back({path, title, author, "", coverBmpPath});
}
if (omitted > 0) {
+4 -2
View File
@@ -160,14 +160,16 @@ void FileBrowserActivity::loop() {
const std::string& entry = files[selectorIndex];
const bool isDirectory = (entry.back() == '/');
if (basepath.back() != '/') basepath += "/";
if (isDirectory) {
if (basepath.back() != '/') basepath += "/";
basepath += entry.substr(0, entry.length() - 1);
loadFiles();
selectorIndex = 0;
requestUpdate();
} else {
onSelectBook(basepath + entry);
std::string fullPath = basepath;
if (fullPath.back() != '/') fullPath += "/";
onSelectBook(fullPath + entry);
}
return;
}