Add manga migration and merge buttons

This commit is contained in:
Jobobby04
2020-05-03 21:24:00 -04:00
parent 567c6ea8e7
commit 06d3a753ac
3 changed files with 59 additions and 0 deletions

View File

@@ -33,6 +33,7 @@ import eu.kanade.tachiyomi.ui.library.ChangeMangaCategoriesDialog
import eu.kanade.tachiyomi.ui.library.LibraryController
import eu.kanade.tachiyomi.ui.main.MainActivity
import eu.kanade.tachiyomi.ui.manga.MangaController
import eu.kanade.tachiyomi.ui.migration.manga.design.PreMigrationController
import eu.kanade.tachiyomi.ui.recent.history.HistoryController
import eu.kanade.tachiyomi.ui.recent.updates.UpdatesController
import eu.kanade.tachiyomi.ui.webview.WebViewActivity
@@ -137,6 +138,20 @@ class MangaInfoController(private val fromSource: Boolean = false) :
.launchIn(scope)
}
binding.btnMigrate.clicks()
.onEach {
PreMigrationController.navigateToMigration(
preferences.skipPreMigration().get(),
router,
listOf(presenter.manga.id!!)
)
}
.launchIn(scope)
binding.btnSmartSearch.clicks()
.onEach { openSmartSearch() }
.launchIn(scope)
// Set SwipeRefresh to refresh manga data.
binding.swipeRefresh.refreshes()
.onEach { fetchMangaFromSource() }