mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-05 01:55:09 +01:00
Minor edits
This commit is contained in:
parent
548dbf4b78
commit
6a3cd0054b
@ -115,14 +115,14 @@ class WebViewActivity : BaseActivity<WebviewActivityBinding>() {
|
||||
}
|
||||
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user