mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2026-02-04 14:47:37 +03:00
fix: post-rebase fixes for upstream compatibility
- Update HomeActivity to use RecentBook struct instead of string - Remove leftover conflict marker from SettingsActivity
This commit is contained in:
parent
7254d46401
commit
fea92fd235
@ -162,11 +162,15 @@ void HomeActivity::loadRecentBooksData() {
|
||||
int recentCount = std::min(static_cast<int>(recentBooks.size()), maxRecentBooks);
|
||||
|
||||
for (int i = 0; i < recentCount; i++) {
|
||||
const std::string& bookPath = recentBooks[i];
|
||||
const RecentBook& recentBook = recentBooks[i];
|
||||
const std::string& bookPath = recentBook.path;
|
||||
CachedBookInfo info;
|
||||
info.path = bookPath; // Store the full path
|
||||
|
||||
// Extract title from path
|
||||
// Use title from RecentBook if available, otherwise extract from path
|
||||
if (!recentBook.title.empty()) {
|
||||
info.title = recentBook.title;
|
||||
} else {
|
||||
info.title = bookPath;
|
||||
size_t lastSlash = info.title.find_last_of('/');
|
||||
if (lastSlash != std::string::npos) {
|
||||
@ -176,6 +180,7 @@ void HomeActivity::loadRecentBooksData() {
|
||||
if (lastDot != std::string::npos) {
|
||||
info.title = info.title.substr(0, lastDot);
|
||||
}
|
||||
}
|
||||
|
||||
if (StringUtils::checkFileExtension(bookPath, ".epub")) {
|
||||
Epub epub(bookPath, "/.crosspoint");
|
||||
|
||||
@ -122,7 +122,6 @@ void updateContextForSetting(ThemeEngine::ThemeContext& ctx, const std::string&
|
||||
}
|
||||
}
|
||||
} // namespace
|
||||
>>>>>>> e6b3ecc (feat: Enhance ThemeEngine and apply new theming to SettingsActivity)
|
||||
|
||||
void SettingsActivity::taskTrampoline(void *param) {
|
||||
auto *self = static_cast<SettingsActivity *>(param);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user