mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-24 19:21:48 +01:00
Fixes for searching with a query in recents
This commit is contained in:
parent
6c4936ac3a
commit
9fbe223970
@ -163,7 +163,7 @@ class RecentsPresenter(
|
|||||||
).executeOnIO()
|
).executeOnIO()
|
||||||
} else emptyList()
|
} else emptyList()
|
||||||
val rUpdates = when {
|
val rUpdates = when {
|
||||||
viewType == VIEW_TYPE_ONLY_UPDATES -> db.getRecentChapters(startCal.time, calWeek.time).executeOnIO().map {
|
viewType == VIEW_TYPE_ONLY_UPDATES -> db.getRecentChapters(startCal.time, calWeek.time, query).executeOnIO().map {
|
||||||
MangaChapterHistory(it.manga, it.chapter, HistoryImpl())
|
MangaChapterHistory(it.manga, it.chapter, HistoryImpl())
|
||||||
}
|
}
|
||||||
viewType != VIEW_TYPE_ONLY_HISTORY -> db.getUpdatedManga(startCal.time, calWeek.time, query, isUngrouped && !limit).executeOnIO()
|
viewType != VIEW_TYPE_ONLY_HISTORY -> db.getUpdatedManga(startCal.time, calWeek.time, query, isUngrouped && !limit).executeOnIO()
|
||||||
@ -184,8 +184,8 @@ class RecentsPresenter(
|
|||||||
}.distinctBy {
|
}.distinctBy {
|
||||||
if (query.isEmpty() && viewType != VIEW_TYPE_ONLY_HISTORY) it.manga.id else it.chapter.id
|
if (query.isEmpty() && viewType != VIEW_TYPE_ONLY_HISTORY) it.manga.id else it.chapter.id
|
||||||
}.filter { mch ->
|
}.filter { mch ->
|
||||||
if (page > 0) {
|
if (page > 0 && query.isEmpty()) {
|
||||||
if (query.isEmpty() && viewType != VIEW_TYPE_ONLY_HISTORY) {
|
if (viewType != VIEW_TYPE_ONLY_HISTORY) {
|
||||||
recentItems.none { mch.manga.id == it.mch.manga.id }
|
recentItems.none { mch.manga.id == it.mch.manga.id }
|
||||||
} else {
|
} else {
|
||||||
recentItems.none { mch.chapter.id == it.mch.chapter.id }
|
recentItems.none { mch.chapter.id == it.mch.chapter.id }
|
||||||
|
Loading…
Reference in New Issue
Block a user