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,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")) {
|
||||||
|
|||||||
@ -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);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user