mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-04 01:19:33 +00:00
Force theme and colors in WaitListView.
This commit is contained in:
+8
-4
@@ -29,7 +29,9 @@ import androidx.compose.foundation.layout.padding
|
|||||||
import androidx.compose.foundation.layout.size
|
import androidx.compose.foundation.layout.size
|
||||||
import androidx.compose.foundation.layout.systemBarsPadding
|
import androidx.compose.foundation.layout.systemBarsPadding
|
||||||
import androidx.compose.foundation.layout.widthIn
|
import androidx.compose.foundation.layout.widthIn
|
||||||
|
import androidx.compose.material3.LocalContentColor
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
|
import androidx.compose.runtime.CompositionLocalProvider
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.BiasAbsoluteAlignment
|
import androidx.compose.ui.BiasAbsoluteAlignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
@@ -131,6 +133,9 @@ private fun WaitListContent(
|
|||||||
state: WaitListState,
|
state: WaitListState,
|
||||||
onCancelClicked: () -> Unit,
|
onCancelClicked: () -> Unit,
|
||||||
modifier: Modifier = Modifier,
|
modifier: Modifier = Modifier,
|
||||||
|
) {
|
||||||
|
ElementTheme(
|
||||||
|
darkTheme = true
|
||||||
) {
|
) {
|
||||||
Box(
|
Box(
|
||||||
modifier = modifier
|
modifier = modifier
|
||||||
@@ -139,7 +144,7 @@ private fun WaitListContent(
|
|||||||
.padding(horizontal = 16.dp, vertical = 16.dp)
|
.padding(horizontal = 16.dp, vertical = 16.dp)
|
||||||
) {
|
) {
|
||||||
if (state.loginAction !is Async.Success) {
|
if (state.loginAction !is Async.Success) {
|
||||||
ElementTheme(darkTheme = true) {
|
CompositionLocalProvider(LocalContentColor provides Color.Black) {
|
||||||
TextButton(
|
TextButton(
|
||||||
text = stringResource(CommonStrings.action_cancel),
|
text = stringResource(CommonStrings.action_cancel),
|
||||||
onClick = onCancelClicked,
|
onClick = onCancelClicked,
|
||||||
@@ -160,7 +165,7 @@ private fun WaitListContent(
|
|||||||
CircularProgressIndicator(
|
CircularProgressIndicator(
|
||||||
modifier = Modifier.size(24.dp),
|
modifier = Modifier.size(24.dp),
|
||||||
strokeWidth = 2.dp,
|
strokeWidth = 2.dp,
|
||||||
color = Color.White
|
color = ElementTheme.colors.iconPrimary
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
Spacer(modifier = Modifier.height(24.dp))
|
Spacer(modifier = Modifier.height(24.dp))
|
||||||
@@ -174,7 +179,7 @@ private fun WaitListContent(
|
|||||||
text = withColoredPeriod(titleRes),
|
text = withColoredPeriod(titleRes),
|
||||||
style = ElementTheme.typography.fontHeadingXlBold,
|
style = ElementTheme.typography.fontHeadingXlBold,
|
||||||
textAlign = TextAlign.Center,
|
textAlign = TextAlign.Center,
|
||||||
color = Color.White,
|
color = ElementTheme.colors.textPrimary,
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.height(8.dp))
|
Spacer(modifier = Modifier.height(8.dp))
|
||||||
val subtitle = when (state.loginAction) {
|
val subtitle = when (state.loginAction) {
|
||||||
@@ -198,7 +203,6 @@ private fun WaitListContent(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (state.loginAction is Async.Success) {
|
if (state.loginAction is Async.Success) {
|
||||||
ElementTheme(darkTheme = true) {
|
|
||||||
Button(
|
Button(
|
||||||
text = stringResource(id = CommonStrings.action_continue),
|
text = stringResource(id = CommonStrings.action_continue),
|
||||||
onClick = { state.eventSink.invoke(WaitListEvents.Continue) },
|
onClick = { state.eventSink.invoke(WaitListEvents.Continue) },
|
||||||
|
|||||||
Reference in New Issue
Block a user