Remove some usages of global scope
This commit is contained in:
+2
-2
@@ -595,7 +595,7 @@ open class BrowseSourceController(bundle: Bundle) :
|
||||
override fun onItemLongClick(position: Int) {
|
||||
val activity = activity ?: return
|
||||
val manga = (adapter?.getItem(position) as? SourceItem?)?.manga ?: return
|
||||
launchIO {
|
||||
viewScope.launchIO {
|
||||
val duplicateManga = presenter.getDuplicateLibraryManga(manga)
|
||||
|
||||
withUIContext {
|
||||
@@ -631,7 +631,7 @@ open class BrowseSourceController(bundle: Bundle) :
|
||||
|
||||
private fun addToLibrary(newManga: Manga, position: Int) {
|
||||
val activity = activity ?: return
|
||||
launchIO {
|
||||
viewScope.launchIO {
|
||||
val categories = presenter.getCategories()
|
||||
val defaultCategoryId = preferences.defaultCategory()
|
||||
val defaultCategory = categories.find { it.id == defaultCategoryId.toLong() }
|
||||
|
||||
+1
-1
@@ -194,7 +194,7 @@ open class BrowseSourcePresenter(
|
||||
if (!hasNextPage()) return
|
||||
|
||||
nextPageJob?.cancel()
|
||||
nextPageJob = launchIO {
|
||||
nextPageJob = presenterScope.launchIO {
|
||||
try {
|
||||
pager.requestNextPage()
|
||||
} catch (e: Throwable) {
|
||||
|
||||
Reference in New Issue
Block a user