mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-13 00:05:08 +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)
|
var headerItem = MangaHeaderItem(manga, controller.fromCatalogue)
|
||||||
|
|
||||||
fun onCreate() {
|
fun onCreate() {
|
||||||
scope.launch {
|
|
||||||
withContext(Dispatchers.IO) {
|
|
||||||
isLockedFromSearch = SecureActivityDelegate.shouldBeLocked()
|
isLockedFromSearch = SecureActivityDelegate.shouldBeLocked()
|
||||||
headerItem.isLocked = isLockedFromSearch
|
headerItem.isLocked = isLockedFromSearch
|
||||||
downloadManager.addListener(this@MangaDetailsPresenter)
|
downloadManager.addListener(this)
|
||||||
LibraryUpdateService.setListener(this@MangaDetailsPresenter)
|
LibraryUpdateService.setListener(this)
|
||||||
tracks = db.getTracks(manga).executeAsBlocking()
|
tracks = db.getTracks(manga).executeAsBlocking()
|
||||||
if (manga.source == LocalSource.ID) {
|
if (manga.source == LocalSource.ID) {
|
||||||
refreshAll()
|
refreshAll()
|
||||||
} else if (!manga.initialized) {
|
} else if (!manga.initialized) {
|
||||||
isLoading = true
|
isLoading = true
|
||||||
withContext(Dispatchers.Main) {
|
|
||||||
controller.setRefresh(true)
|
controller.setRefresh(true)
|
||||||
controller.updateHeader()
|
controller.updateHeader()
|
||||||
}
|
|
||||||
refreshAll()
|
refreshAll()
|
||||||
} else {
|
} else {
|
||||||
updateChapters()
|
updateChapters()
|
||||||
withContext(Dispatchers.Main) {
|
controller.updateChapters(this.chapters)
|
||||||
controller.updateChapters(this@MangaDetailsPresenter.chapters)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
setTrackItems()
|
setTrackItems()
|
||||||
refreshTracking(false)
|
refreshTracking(false)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fun onDestroy() {
|
fun onDestroy() {
|
||||||
downloadManager.removeListener(this)
|
downloadManager.removeListener(this)
|
||||||
|
Loading…
Reference in New Issue
Block a user