diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt index 3b6b4e2f1..e060d1cab 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt @@ -37,6 +37,8 @@ import eu.kanade.tachiyomi.data.preference.PreferencesHelper import eu.kanade.tachiyomi.data.preference.asImmediateFlow import eu.kanade.tachiyomi.databinding.ReaderActivityBinding import eu.kanade.tachiyomi.ui.base.activity.BaseRxActivity +import eu.kanade.tachiyomi.ui.main.MainActivity +import eu.kanade.tachiyomi.ui.manga.MangaController import eu.kanade.tachiyomi.ui.reader.ReaderPresenter.SetAsCoverResult.AddToLibraryFirst import eu.kanade.tachiyomi.ui.reader.ReaderPresenter.SetAsCoverResult.Error import eu.kanade.tachiyomi.ui.reader.ReaderPresenter.SetAsCoverResult.Success @@ -294,7 +296,6 @@ class ReaderActivity : BaseRxActivity() * Initializes the reader menu. It sets up click listeners and the initial visibility. */ private fun initializeMenu() { - // Set toolbar setSupportActionBar(binding.toolbar) supportActionBar?.setDisplayHomeAsUpEnabled(true) binding.toolbar.setNavigationOnClickListener { @@ -314,6 +315,18 @@ class ReaderActivity : BaseRxActivity() insets } + binding.toolbar.setOnClickListener { + presenter.manga?.id?.let { id -> + startActivity( + Intent(this, MainActivity::class.java).apply { + action = MainActivity.SHORTCUT_MANGA + putExtra(MangaController.MANGA_EXTRA, id) + addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP) + } + ) + } + } + // Init listeners on bottom menu binding.pageSeekbar.setOnSeekBarChangeListener( object : SimpleSeekBarListener() {