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 e46381faa..353da4493 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 @@ -152,16 +152,19 @@ class WebViewActivity : BaseActivity() { return true } - override fun onPrepareOptionsMenu(menu: Menu?): Boolean { - 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() - + override fun onPrepareOptionsMenu(menu: Menu): Boolean { val iconTintColor = getResourceColor(R.attr.colorOnSurface) val translucentIconTintColor = ColorUtils.setAlphaComponent(iconTintColor, 127) - backItem?.icon?.setTint(if (binding.webview.canGoBack()) iconTintColor else translucentIconTintColor) - forwardItem?.icon?.setTint(if (binding.webview.canGoForward()) iconTintColor else translucentIconTintColor) + + menu.findItem(R.id.action_web_back).apply { + isEnabled = binding.webview.canGoBack() + icon.setTint(if (binding.webview.canGoBack()) iconTintColor else translucentIconTintColor) + } + + menu.findItem(R.id.action_web_forward).apply { + isEnabled = binding.webview.canGoForward() + icon.setTint(if (binding.webview.canGoForward()) iconTintColor else translucentIconTintColor) + } return super.onPrepareOptionsMenu(menu) } diff --git a/gradle/androidx.versions.toml b/gradle/androidx.versions.toml index f302ec313..199c88525 100644 --- a/gradle/androidx.versions.toml +++ b/gradle/androidx.versions.toml @@ -1,6 +1,6 @@ [versions] agp_version = "7.1.2" -lifecycle_version = "2.5.0-alpha05" +lifecycle_version = "2.5.0-alpha06" [libraries] annotation = "androidx.annotation:annotation:1.4.0-alpha02" @@ -8,9 +8,9 @@ appcompat = "androidx.appcompat:appcompat:1.4.1" biometricktx = "androidx.biometric:biometric-ktx:1.2.0-alpha04" constraintlayout = "androidx.constraintlayout:constraintlayout:2.1.3" coordinatorlayout = "androidx.coordinatorlayout:coordinatorlayout:1.2.0" -corektx = "androidx.core:core-ktx:1.8.0-alpha05" +corektx = "androidx.core:core-ktx:1.8.0-alpha07" splashscreen = "androidx.core:core-splashscreen:1.0.0-alpha02" -recyclerview = "androidx.recyclerview:recyclerview:1.3.0-alpha01" +recyclerview = "androidx.recyclerview:recyclerview:1.3.0-alpha02" swiperefreshlayout = "androidx.swiperefreshlayout:swiperefreshlayout:1.2.0-alpha01" viewpager = "androidx.viewpager:viewpager:1.1.0-alpha01" diff --git a/gradle/kotlinx.versions.toml b/gradle/kotlinx.versions.toml index f2be866ca..268e66b5f 100644 --- a/gradle/kotlinx.versions.toml +++ b/gradle/kotlinx.versions.toml @@ -1,6 +1,6 @@ [versions] -kotlin_version = "1.6.10" -coroutines_version = "1.6.0" +kotlin_version = "1.6.20" +coroutines_version = "1.6.1" serialization_version = "1.3.2" [libraries] diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 1617b424d..5a2116d03 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -36,7 +36,7 @@ disklrucache = "com.jakewharton:disklrucache:2.0.2" unifile = "com.github.tachiyomiorg:unifile:17bec43" junrar = "com.github.junrar:junrar:7.4.0" -sqlitektx = "androidx.sqlite:sqlite-ktx:2.2.0" +sqlitektx = "androidx.sqlite:sqlite-ktx:2.3.0-alpha02" sqlite-android = "com.github.requery:sqlite-android:3.36.0" preferencektx = "androidx.preference:preference-ktx:1.2.0"