Skip to content

Commit

Permalink
fix: lint (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
timbru31 committed Sep 25, 2023
1 parent 1db9f96 commit a2b68ed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/android/AndroidDarkModeSupport.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import org.apache.cordova.CordovaPlugin
import org.apache.cordova.engine.SystemWebView

class AndroidDarkModeSupport : CordovaPlugin() {

override fun pluginInitialize() {
checkDarkMode()
}
Expand All @@ -19,8 +18,9 @@ class AndroidDarkModeSupport : CordovaPlugin() {

private fun checkDarkMode() {
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.S_V2) {
val nightMode: Boolean = cordova.context.resources.configuration.uiMode and
Configuration.UI_MODE_NIGHT_MASK == Configuration.UI_MODE_NIGHT_YES
val nightMode: Boolean =
cordova.context.resources.configuration.uiMode and
Configuration.UI_MODE_NIGHT_MASK == Configuration.UI_MODE_NIGHT_YES
val view = (webView.engine.view as SystemWebView).settings

if (WebViewFeature.isFeatureSupported(WebViewFeature.FORCE_DARK)) {
Expand Down

0 comments on commit a2b68ed

Please sign in to comment.