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); int recentCount = std::min(static_cast<int>(recentBooks.size()), maxRecentBooks);
for (int i = 0; i < recentCount; i++) { 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; CachedBookInfo info;
info.path = bookPath; // Store the full path info.path = bookPath; // Store the full path
// Extract title from path // Use title from RecentBook if available, otherwise extract from path
info.title = bookPath; if (!recentBook.title.empty()) {
size_t lastSlash = info.title.find_last_of('/'); info.title = recentBook.title;
if (lastSlash != std::string::npos) { } else {
info.title = info.title.substr(lastSlash + 1); info.title = bookPath;
} size_t lastSlash = info.title.find_last_of('/');
size_t lastDot = info.title.find_last_of('.'); if (lastSlash != std::string::npos) {
if (lastDot != std::string::npos) { info.title = info.title.substr(lastSlash + 1);
info.title = info.title.substr(0, lastDot); }
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")) { if (StringUtils::checkFileExtension(bookPath, ".epub")) {

View File

@ -122,7 +122,6 @@ void updateContextForSetting(ThemeEngine::ThemeContext& ctx, const std::string&
} }
} }
} // namespace } // namespace
>>>>>>> e6b3ecc (feat: Enhance ThemeEngine and apply new theming to SettingsActivity)
void SettingsActivity::taskTrampoline(void *param) { void SettingsActivity::taskTrampoline(void *param) {
auto *self = static_cast<SettingsActivity *>(param); auto *self = static_cast<SettingsActivity *>(param);