|
|
|
@ -3,7 +3,6 @@ package org.thoughtcrime.securesms.ui
|
|
|
|
|
import androidx.annotation.DrawableRes
|
|
|
|
|
import androidx.annotation.StringRes
|
|
|
|
|
import androidx.compose.animation.AnimatedVisibility
|
|
|
|
|
import androidx.compose.foundation.BorderStroke
|
|
|
|
|
import androidx.compose.foundation.Canvas
|
|
|
|
|
import androidx.compose.foundation.Image
|
|
|
|
|
import androidx.compose.foundation.ScrollState
|
|
|
|
@ -27,29 +26,19 @@ import androidx.compose.foundation.lazy.LazyColumn
|
|
|
|
|
import androidx.compose.foundation.lazy.itemsIndexed
|
|
|
|
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
|
|
|
|
import androidx.compose.material.ButtonColors
|
|
|
|
|
import androidx.compose.material.ButtonDefaults
|
|
|
|
|
import androidx.compose.material.Card
|
|
|
|
|
import androidx.compose.material.CircularProgressIndicator
|
|
|
|
|
import androidx.compose.material.Colors
|
|
|
|
|
import androidx.compose.material.ContentAlpha
|
|
|
|
|
import androidx.compose.material.Icon
|
|
|
|
|
import androidx.compose.material.LocalContentColor
|
|
|
|
|
import androidx.compose.material.MaterialTheme
|
|
|
|
|
import androidx.compose.material.OutlinedButton
|
|
|
|
|
import androidx.compose.material.RadioButton
|
|
|
|
|
import androidx.compose.material.Text
|
|
|
|
|
import androidx.compose.material.TextButton
|
|
|
|
|
import androidx.compose.runtime.Composable
|
|
|
|
|
import androidx.compose.runtime.CompositionLocalProvider
|
|
|
|
|
import androidx.compose.runtime.LaunchedEffect
|
|
|
|
|
import androidx.compose.runtime.getValue
|
|
|
|
|
import androidx.compose.runtime.mutableStateOf
|
|
|
|
|
import androidx.compose.runtime.remember
|
|
|
|
|
import androidx.compose.runtime.rememberCoroutineScope
|
|
|
|
|
import androidx.compose.runtime.setValue
|
|
|
|
|
import androidx.compose.ui.Alignment
|
|
|
|
|
import androidx.compose.ui.Modifier
|
|
|
|
|
import androidx.compose.ui.composed
|
|
|
|
|
import androidx.compose.ui.draw.alpha
|
|
|
|
|
import androidx.compose.ui.draw.drawWithContent
|
|
|
|
|
import androidx.compose.ui.geometry.Size
|
|
|
|
@ -65,11 +54,8 @@ import androidx.compose.ui.res.painterResource
|
|
|
|
|
import androidx.compose.ui.res.stringResource
|
|
|
|
|
import androidx.compose.ui.semantics.contentDescription
|
|
|
|
|
import androidx.compose.ui.semantics.semantics
|
|
|
|
|
import androidx.compose.ui.text.style.TextAlign
|
|
|
|
|
import androidx.compose.ui.unit.Dp
|
|
|
|
|
import androidx.compose.ui.unit.TextUnit
|
|
|
|
|
import androidx.compose.ui.unit.dp
|
|
|
|
|
import androidx.compose.ui.unit.sp
|
|
|
|
|
import androidx.compose.ui.viewinterop.AndroidView
|
|
|
|
|
import com.google.accompanist.drawablepainter.rememberDrawablePainter
|
|
|
|
|
import kotlinx.coroutines.CoroutineScope
|
|
|
|
@ -251,13 +237,13 @@ fun <T> TitledRadioButton(option: RadioOption<T>, onClick: () -> Unit) {
|
|
|
|
|
Column {
|
|
|
|
|
Text(
|
|
|
|
|
text = option.title(),
|
|
|
|
|
fontSize = 16.sp,
|
|
|
|
|
style = MaterialTheme.typography.large,
|
|
|
|
|
modifier = Modifier.alpha(if (option.enabled) 1f else 0.5f)
|
|
|
|
|
)
|
|
|
|
|
option.subtitle?.let {
|
|
|
|
|
Text(
|
|
|
|
|
text = it(),
|
|
|
|
|
fontSize = 11.sp,
|
|
|
|
|
style = MaterialTheme.typography.extraSmall,
|
|
|
|
|
modifier = Modifier.alpha(if (option.enabled) 1f else 0.5f)
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|