mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 21:32:34 +00:00
Default to dark theme for EC (#7162)
* Default to dark theme for EC (this is the intended design on light and dark system configuration) * Use `theme=dark` url param for element call * Update CallScreenPresenter.kt
This commit is contained in:
+1
-2
@@ -22,7 +22,6 @@ import dev.zacsweers.metro.Assisted
|
|||||||
import dev.zacsweers.metro.AssistedFactory
|
import dev.zacsweers.metro.AssistedFactory
|
||||||
import dev.zacsweers.metro.AssistedInject
|
import dev.zacsweers.metro.AssistedInject
|
||||||
import im.vector.app.features.analytics.plan.MobileScreen
|
import im.vector.app.features.analytics.plan.MobileScreen
|
||||||
import io.element.android.compound.theme.ElementTheme
|
|
||||||
import io.element.android.features.call.api.CallData
|
import io.element.android.features.call.api.CallData
|
||||||
import io.element.android.features.call.impl.data.WidgetMessage
|
import io.element.android.features.call.impl.data.WidgetMessage
|
||||||
import io.element.android.features.call.impl.utils.ActiveCallManager
|
import io.element.android.features.call.impl.utils.ActiveCallManager
|
||||||
@@ -84,7 +83,7 @@ class CallScreenPresenter(
|
|||||||
var ignoreWebViewError by rememberSaveable { mutableStateOf(false) }
|
var ignoreWebViewError by rememberSaveable { mutableStateOf(false) }
|
||||||
var webViewError by remember { mutableStateOf<String?>(null) }
|
var webViewError by remember { mutableStateOf<String?>(null) }
|
||||||
val languageTag = languageTagProvider.provideLanguageTag()
|
val languageTag = languageTagProvider.provideLanguageTag()
|
||||||
val theme = if (ElementTheme.isLightTheme) "light" else "dark"
|
val theme = "dark"
|
||||||
|
|
||||||
DisposableEffect(Unit) {
|
DisposableEffect(Unit) {
|
||||||
coroutineScope.launch {
|
coroutineScope.launch {
|
||||||
|
|||||||
+5
@@ -38,6 +38,7 @@ import androidx.core.view.WindowInsetsControllerCompat
|
|||||||
import androidx.lifecycle.Lifecycle
|
import androidx.lifecycle.Lifecycle
|
||||||
import dev.zacsweers.metro.Inject
|
import dev.zacsweers.metro.Inject
|
||||||
import io.element.android.compound.colors.SemanticColorsLightDark
|
import io.element.android.compound.colors.SemanticColorsLightDark
|
||||||
|
import io.element.android.compound.theme.ForcedDarkElementTheme
|
||||||
import io.element.android.features.call.api.CallData
|
import io.element.android.features.call.api.CallData
|
||||||
import io.element.android.features.call.impl.DefaultElementCallEntryPoint
|
import io.element.android.features.call.impl.DefaultElementCallEntryPoint
|
||||||
import io.element.android.features.call.impl.di.CallBindings
|
import io.element.android.features.call.impl.di.CallBindings
|
||||||
@@ -142,6 +143,9 @@ class ElementCallActivity :
|
|||||||
compoundLight = colors.light,
|
compoundLight = colors.light,
|
||||||
compoundDark = colors.dark,
|
compoundDark = colors.dark,
|
||||||
buildMeta = buildMeta,
|
buildMeta = buildMeta,
|
||||||
|
) {
|
||||||
|
ForcedDarkElementTheme(
|
||||||
|
colors = colors,
|
||||||
) {
|
) {
|
||||||
val state = presenter.present()
|
val state = presenter.present()
|
||||||
eventSink = state.eventSink
|
eventSink = state.eventSink
|
||||||
@@ -164,6 +168,7 @@ class ElementCallActivity :
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun setCallIsActive() {
|
private fun setCallIsActive() {
|
||||||
audioFocus.requestAudioFocus(
|
audioFocus.requestAudioFocus(
|
||||||
|
|||||||
Reference in New Issue
Block a user