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:
Brackyt 2026-01-29 13:24:07 +01:00
parent 7254d46401
commit fea92fd235
2 changed files with 15 additions and 11 deletions

View File

@ -162,19 +162,24 @@ 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
info.title = bookPath;
size_t lastSlash = info.title.find_last_of('/');
if (lastSlash != std::string::npos) {
info.title = info.title.substr(lastSlash + 1);
}
size_t lastDot = info.title.find_last_of('.');
if (lastDot != std::string::npos) {
info.title = info.title.substr(0, lastDot);
// 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) {
info.title = info.title.substr(lastSlash + 1);
}
size_t lastDot = info.title.find_last_of('.');
if (lastDot != std::string::npos) {
info.title = info.title.substr(0, lastDot);
}
}
if (StringUtils::checkFileExtension(bookPath, ".epub")) {

View File

@ -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);