mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-09 19:55:11 +01:00
Removed coroutine on manga presenter launch
Since the page scroll is reset on theme switch
This commit is contained in:
parent
281470252b
commit
23e7b380b0
@ -83,33 +83,26 @@ class MangaDetailsPresenter(
|
||||
var headerItem = MangaHeaderItem(manga, controller.fromCatalogue)
|
||||
|
||||
fun onCreate() {
|
||||
scope.launch {
|
||||
withContext(Dispatchers.IO) {
|
||||
|
||||
isLockedFromSearch = SecureActivityDelegate.shouldBeLocked()
|
||||
headerItem.isLocked = isLockedFromSearch
|
||||
downloadManager.addListener(this@MangaDetailsPresenter)
|
||||
LibraryUpdateService.setListener(this@MangaDetailsPresenter)
|
||||
downloadManager.addListener(this)
|
||||
LibraryUpdateService.setListener(this)
|
||||
tracks = db.getTracks(manga).executeAsBlocking()
|
||||
if (manga.source == LocalSource.ID) {
|
||||
refreshAll()
|
||||
} else if (!manga.initialized) {
|
||||
isLoading = true
|
||||
withContext(Dispatchers.Main) {
|
||||
controller.setRefresh(true)
|
||||
controller.updateHeader()
|
||||
}
|
||||
refreshAll()
|
||||
} else {
|
||||
updateChapters()
|
||||
withContext(Dispatchers.Main) {
|
||||
controller.updateChapters(this@MangaDetailsPresenter.chapters)
|
||||
}
|
||||
controller.updateChapters(this.chapters)
|
||||
}
|
||||
setTrackItems()
|
||||
refreshTracking(false)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun onDestroy() {
|
||||
downloadManager.removeListener(this)
|
||||
|
Loading…
Reference in New Issue
Block a user