SHARE
TWEET

Untitled

a guest Jul 22nd, 2019 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import eu.kanade.tachiyomi.ui.migration.MigrationController
  2. import eu.kanade.tachiyomi.ui.migration.SearchController
  3.  
  4.     override fun onOptionsItemSelected(item: MenuItem): Boolean {
  5.         when (item.itemId) {
  6.             R.id.action_open_in_browser -> openInBrowser()
  7.             R.id.action_open_in_web_view -> openInWebView()
  8.             R.id.action_share -> shareManga()
  9.             R.id.action_add_to_home_screen -> addToHomeScreen()
  10.             R.id.action_migrate -> migrate()
  11.             else -> return super.onOptionsItemSelected(item)
  12.         }
  13.         return true
  14.     }
  15.  
  16.     /**
  17.      * Migrate the current manga to a different source
  18.      */
  19.     private fun migrate() {
  20.         val migrationController = MigrationController()
  21.         val controller = SearchController(presenter.manga)
  22.         controller.targetController = migrationController
  23.  
  24.         router.pushController(controller.withFadeTransaction())
  25.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top