Fix empty filters when searching with query string (#5328)

This commit is contained in:
Clarence Castillo 2021-01-06 11:11:39 +08:00 committed by GitHub
parent 86392bf6a9
commit 91bf6734d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'GMANGA'
pkgNameSuffix = 'ar.gmanga'
extClass = '.Gmanga'
extVersionCode = 1
extVersionCode = 2
libVersion = '1.2'
containsNsfw = false
}

View File

@ -166,7 +166,7 @@ class Gmanga : ConfigurableSource, HttpSource() {
}
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
return GmangaFilters.buildSearchPayload(page, query, filters).let {
return GmangaFilters.buildSearchPayload(page, query, if (filters.isEmpty()) getFilterList() else filters).let {
val body = RequestBody.create(MEDIA_TYPE, it.toString())
POST("$baseUrl/api/mangas/search", headers, body)
}