Skip to content

Commit 6a5e74c

Browse files
committed
Another attempt, now in code
1 parent 5e8430d commit 6a5e74c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

app/src/main/kotlin/io/element/android/x/MainActivity.kt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,13 @@ import androidx.compose.foundation.layout.Box
1616
import androidx.compose.foundation.layout.fillMaxSize
1717
import androidx.compose.runtime.Composable
1818
import androidx.compose.runtime.CompositionLocalProvider
19+
import androidx.compose.runtime.DisposableEffect
1920
import androidx.compose.runtime.collectAsState
2021
import androidx.compose.runtime.getValue
2122
import androidx.compose.runtime.remember
2223
import androidx.compose.ui.Modifier
2324
import androidx.compose.ui.platform.LocalUriHandler
25+
import androidx.compose.ui.platform.LocalView
2426
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
2527
import androidx.lifecycle.Lifecycle
2628
import androidx.lifecycle.lifecycleScope
@@ -58,6 +60,13 @@ class MainActivity : NodeActivity() {
5860
setupLockManagement(appBindings.lockScreenService(), appBindings.lockScreenEntryPoint())
5961
enableEdgeToEdge()
6062
setContent {
63+
// Try manually disabling forced dark mode here too
64+
val view = LocalView.current
65+
DisposableEffect(Unit) {
66+
view.isForceDarkAllowed = false
67+
onDispose {}
68+
}
69+
6170
MainContent(appBindings)
6271
}
6372
}

0 commit comments

Comments
 (0)