mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-14 05:15:10 +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,32 +83,25 @@ 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)
|
||||||
downloadManager.addListener(this@MangaDetailsPresenter)
|
LibraryUpdateService.setListener(this)
|
||||||
LibraryUpdateService.setListener(this@MangaDetailsPresenter)
|
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
|
controller.setRefresh(true)
|
||||||
withContext(Dispatchers.Main) {
|
controller.updateHeader()
|
||||||
controller.setRefresh(true)
|
refreshAll()
|
||||||
controller.updateHeader()
|
} else {
|
||||||
}
|
updateChapters()
|
||||||
refreshAll()
|
controller.updateChapters(this.chapters)
|
||||||
} else {
|
|
||||||
updateChapters()
|
|
||||||
withContext(Dispatchers.Main) {
|
|
||||||
controller.updateChapters(this@MangaDetailsPresenter.chapters)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
setTrackItems()
|
|
||||||
refreshTracking(false)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
setTrackItems()
|
||||||
|
refreshTracking(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun onDestroy() {
|
fun onDestroy() {
|
||||||
|
Loading…
Reference in New Issue
Block a user