Show no results found if source returns no results and no error

This commit is contained in:
Jays2Kings 2023-10-16 21:51:42 -07:00
parent 75a750d779
commit 77aba1ed73

View file

@ -172,6 +172,10 @@ open class BrowseSourcePresenter(
val mangas = second
.map { networkToLocalManga(it, sourceId) }
.filter { !prefs.hideInLibraryItems().get() || !it.favorite }
if (mangas.isEmpty() && page == 1) {
withUIContext { view?.onAddPageError(NoResultsException()) }
return@onEach
}
initializeMangas(mangas)
val items = mangas.map {
BrowseSourceItem(it, browseAsList, sourceListType, outlineCovers)