custom novel search fix
This commit is contained in:
parent
e3e3965795
commit
7e5def3a37
3 changed files with 6 additions and 6 deletions
|
@ -314,7 +314,8 @@ class MediaDetailsViewModel : ViewModel() {
|
|||
val novelSources = NovelSources
|
||||
val novelResponses = MutableLiveData<List<ShowResponse>>(null)
|
||||
suspend fun searchNovels(query: String, i: Int) {
|
||||
val source = novelSources[i]
|
||||
val position = if (i >= novelSources.list.size) 0 else i
|
||||
val source = novelSources[position]
|
||||
tryWithSuspend(post = true) {
|
||||
if (source != null) {
|
||||
novelResponses.postValue(source.search(query))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue