Fix crash when opening chapter from BrowseSourceScreen (#8657)
This commit is contained in:
parent
beda99bbe0
commit
1a70ebe7ea
1 changed files with 4 additions and 1 deletions
|
@ -256,10 +256,13 @@ data class BrowseSourceScreen(
|
|||
}
|
||||
}
|
||||
|
||||
private val queryEvent = Channel<SearchType>()
|
||||
suspend fun search(query: String) = queryEvent.send(SearchType.Text(query))
|
||||
suspend fun searchGenre(name: String) = queryEvent.send(SearchType.Genre(name))
|
||||
|
||||
companion object {
|
||||
private val queryEvent = Channel<SearchType>()
|
||||
}
|
||||
|
||||
sealed class SearchType(val txt: String) {
|
||||
class Text(txt: String) : SearchType(txt)
|
||||
class Genre(txt: String) : SearchType(txt)
|
||||
|
|
Reference in a new issue