fix(merged-chapters) Fix chapter's webview (#1116)
* Fix chapter's webview * combine null check * variable name Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
parent
8cfab79227
commit
d385dfe808
1 changed files with 7 additions and 1 deletions
|
|
@ -830,7 +830,13 @@ class ReaderViewModel @JvmOverloads constructor(
|
|||
|
||||
fun getChapterUrl(): String? {
|
||||
val sChapter = getCurrentChapter()?.chapter ?: return null
|
||||
val source = getSource() ?: return null
|
||||
val source = if (manga?.source == MERGED_SOURCE_ID) {
|
||||
state.value.mergedManga?.get(sChapter.manga_id)?.source?.let { sourceId ->
|
||||
sourceManager.getOrStub(sourceId) as? HttpSource
|
||||
}
|
||||
} else {
|
||||
getSource()
|
||||
} ?: return null
|
||||
|
||||
return try {
|
||||
source.getChapterUrl(sChapter)
|
||||
|
|
|
|||
Loading…
Reference in a new issue