From 6a3cd0054b3906d275007438a21dccc0e37ff117 Mon Sep 17 00:00:00 2001 From: arkon Date: Tue, 28 Apr 2020 18:45:04 -0400 Subject: [PATCH] Minor edits --- .../java/eu/kanade/tachiyomi/ui/webview/WebViewActivity.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/webview/WebViewActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/webview/WebViewActivity.kt index ba1b54a29e..335dd3b878 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/webview/WebViewActivity.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/webview/WebViewActivity.kt @@ -115,14 +115,14 @@ class WebViewActivity : BaseActivity() { } override fun onPrepareOptionsMenu(menu: Menu?): Boolean { - val backItem = binding.toolbar.menu.findItem(R.id.action_web_back) - val forwardItem = binding.toolbar.menu.findItem(R.id.action_web_forward) + val backItem = menu?.findItem(R.id.action_web_back) + val forwardItem = menu?.findItem(R.id.action_web_forward) backItem?.isEnabled = binding.webview.canGoBack() forwardItem?.isEnabled = binding.webview.canGoForward() val iconTintColor = getResourceColor(R.attr.colorOnPrimary) val translucentIconTintColor = ColorUtils.setAlphaComponent(iconTintColor, 127) - backItem.icon?.setTint(if (binding.webview.canGoBack()) iconTintColor else translucentIconTintColor) + backItem?.icon?.setTint(if (binding.webview.canGoBack()) iconTintColor else translucentIconTintColor) forwardItem?.icon?.setTint(if (binding.webview.canGoForward()) iconTintColor else translucentIconTintColor) return super.onPrepareOptionsMenu(menu)