Review fixes
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user