diff --git a/build.gradle.kts b/build.gradle.kts index c9fe9f5c..80d4fc5d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -103,7 +103,6 @@ tasks { "ZCASH_RELEASE_PACKAGE_NAME" to "co.electriccoin.zcash", "ZCASH_SUPPORT_EMAIL_ADDRESS" to "support@electriccoin.co", "IS_SECURE_SCREEN_PROTECTION_ACTIVE" to "true", - "IS_DARK_MODE_ENABLED" to "false", "IS_SCREEN_ROTATION_ENABLED" to "false", "ZCASH_DEBUG_KEYSTORE_PATH" to "", diff --git a/gradle.properties b/gradle.properties index 27e75a9b..943309db 100644 --- a/gradle.properties +++ b/gradle.properties @@ -75,9 +75,6 @@ ZCASH_SUPPORT_EMAIL_ADDRESS=support@electriccoin.co # Recommended protection of screens with sensitive data. # It is enabled by default to protect the developers from revealing their wallet secrets by mistake. IS_SECURE_SCREEN_PROTECTION_ACTIVE=true -# Forcibly turn on or off the UI dark mode support. If enabled, then the device's dark mode system setting value is -# applied. -IS_DARK_MODE_ENABLED=false # Set whether the screen rotation is enabled or the screen orientation is locked in the portrait mode. IS_SCREEN_ROTATION_ENABLED=false diff --git a/ui-design-lib/build.gradle.kts b/ui-design-lib/build.gradle.kts index 394e96b0..89cf4fa1 100644 --- a/ui-design-lib/build.gradle.kts +++ b/ui-design-lib/build.gradle.kts @@ -1,5 +1,3 @@ -import com.android.build.api.variant.BuildConfigField - plugins { id("com.android.library") kotlin("android") @@ -30,20 +28,6 @@ android { } } -androidComponents { - onVariants { variant -> - // Configure dark mode support for the app runtime - variant.buildConfigFields.put( - "IS_APP_DARK_MODE_ENABLED", - BuildConfigField( - type = "boolean", - value = project.property("IS_DARK_MODE_ENABLED").toString(), - comment = "Whether is the app dark mode supported" - ) - ) - } -} - dependencies { implementation(libs.androidx.annotation) implementation(libs.androidx.constraintlayout) diff --git a/ui-design-lib/src/main/java/co/electriccoin/zcash/ui/design/theme/ZcashTheme.kt b/ui-design-lib/src/main/java/co/electriccoin/zcash/ui/design/theme/ZcashTheme.kt index 87cb9874..8a4d8790 100644 --- a/ui-design-lib/src/main/java/co/electriccoin/zcash/ui/design/theme/ZcashTheme.kt +++ b/ui-design-lib/src/main/java/co/electriccoin/zcash/ui/design/theme/ZcashTheme.kt @@ -4,7 +4,6 @@ import androidx.compose.foundation.isSystemInDarkTheme import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.runtime.CompositionLocalProvider -import co.electriccoin.zcash.ui.design.BuildConfig import co.electriccoin.zcash.ui.design.theme.internal.DarkColorPalette import co.electriccoin.zcash.ui.design.theme.internal.DarkExtendedColorPalette import co.electriccoin.zcash.ui.design.theme.internal.ExtendedTypography @@ -27,9 +26,7 @@ fun ZcashTheme( forceDarkMode: Boolean = false, content: @Composable () -> Unit ) { - // forceDarkMode takes precedence, then decides, based on the globally defined Gradle property - // IS_APP_DARK_MODE_ENABLED, whether the device's system dark mode is on or off. - val useDarkMode = forceDarkMode || (BuildConfig.IS_APP_DARK_MODE_ENABLED && isSystemInDarkTheme()) + val useDarkMode = forceDarkMode || isSystemInDarkTheme() val baseColors = if (useDarkMode) {