mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-09 05:05:22 +01:00
Fix a few more endless loading issues
This commit is contained in:
parent
40a9b2c421
commit
212386f3cc
@ -312,7 +312,7 @@ class RecentsController(bundle: Bundle? = null) :
|
||||
if (!hasNewItems || presenter.viewType == RecentsPresenter.VIEW_TYPE_GROUP_ALL || presenter.query.isNotEmpty() ||
|
||||
recents.isEmpty()
|
||||
) {
|
||||
onAddPageError()
|
||||
loadNoMore()
|
||||
} else if (hasNewItems && presenter.viewType != RecentsPresenter.VIEW_TYPE_GROUP_ALL && presenter.query.isEmpty()) {
|
||||
resetProgressItem()
|
||||
}
|
||||
@ -477,7 +477,7 @@ class RecentsController(bundle: Bundle? = null) :
|
||||
setOnQueryTextChangeListener(searchView) {
|
||||
if (presenter.query != it) {
|
||||
presenter.query = it ?: return@setOnQueryTextChangeListener false
|
||||
onAddPageError()
|
||||
loadNoMore()
|
||||
refresh()
|
||||
}
|
||||
true
|
||||
@ -544,14 +544,18 @@ class RecentsController(bundle: Bundle? = null) :
|
||||
|
||||
override fun onLoadMore(lastPosition: Int, currentPage: Int) {
|
||||
val view = view ?: return
|
||||
if (presenter.finished || BackupRestoreService.isRunning(view.context.applicationContext)) {
|
||||
onAddPageError()
|
||||
if (presenter.finished ||
|
||||
BackupRestoreService.isRunning(view.context.applicationContext) ||
|
||||
presenter.viewType == RecentsPresenter.VIEW_TYPE_GROUP_ALL ||
|
||||
presenter.query.isNotEmpty()
|
||||
) {
|
||||
loadNoMore()
|
||||
return
|
||||
}
|
||||
presenter.requestNext()
|
||||
}
|
||||
|
||||
private fun onAddPageError() {
|
||||
private fun loadNoMore() {
|
||||
adapter.onLoadMoreComplete(null)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user