fix(manga): Fix crashes

This commit is contained in:
Ahmad Ansori Palembani 2024-12-18 06:00:27 +07:00
parent cba97eb94d
commit 18c5a68981
Signed by: null2264
GPG key ID: BA64F8B60AF3EFB6
2 changed files with 8 additions and 2 deletions

View file

@ -11,6 +11,10 @@ The format is simplified version of [Keep a Changelog](https://keepachangelog.co
## [Unreleased]
### Fixes
- Fix weird flickering when browsing sources
- Fix some crashes
## [1.9.5]
### Changes

View file

@ -227,7 +227,9 @@ class MangaDetailsPresenter(
presenterScope.launch {
isLoading = true
controller.updateHeader()
withUIContext {
controller.updateHeader()
}
val tasks = listOf(
async { if (fetchMangaNeeded) fetchMangaFromSource() },
async { if (fetchChaptersNeeded) fetchChaptersFromSource(false) },
@ -539,7 +541,7 @@ class MangaDetailsPresenter(
}
updateChapter.awaitAll(updates)
getChapters()
withContext(Dispatchers.Main) { view?.updateChapters() }
withUIContext { view?.updateChapters() }
}
}