Compare commits

..

1 Commits

Author SHA1 Message Date
5db3391b7d feat(CON-171) : Summary consent screen
feat(CON-172) : Detail consent screen
feat(-) : Send consent to BO to save them
2025-01-07 11:24:28 +01:00
3 changed files with 5 additions and 6 deletions

View File

@ -91,7 +91,7 @@ fun DemoNavGraph(navHostController: NavHostController) {
},
consentium = Consentium(
context = context,
applicationId = "ApplicationId",
"ApplicationId",
),
colors = ConsentiumDefaults.colors(
primary = Primary,

View File

@ -12,7 +12,7 @@ import androidx.core.graphics.ColorUtils
object ConsentiumDefaults {
private const val OUTLINE_COLOR_BLEND_RATIO = 0.1f
private const val SURFACE_PRIMARY_COLOR_BLEND_RATIO = 0.1f
private object Typography {
private val DEFAULT_LINE_HEIGHT = 24.sp
@ -101,7 +101,7 @@ object ConsentiumDefaults {
ColorUtils.blendARGB(
onPrimary.toArgb(),
primary.toArgb(),
OUTLINE_COLOR_BLEND_RATIO,
SURFACE_PRIMARY_COLOR_BLEND_RATIO,
)
),
error: Color = MaterialTheme.colorScheme.error,

View File

@ -1,6 +1,5 @@
package fr.openium.consentium_ui.ui.utils
import android.text.ParcelableSpan
import android.text.Spanned
import androidx.compose.ui.text.AnnotatedString
import androidx.compose.ui.text.SpanStyle
@ -14,7 +13,7 @@ fun htmlToAnnotatedString(html: String): AnnotatedString {
return buildAnnotatedString {
val text = spanned.toString()
var start = 0
spanned.getSpans(0, spanned.length, Any::class.java).map { it as ParcelableSpan }.forEach { span ->
spanned.getSpans(0, spanned.length, Any::class.java).forEach { span ->
val startSpan = spanned.getSpanStart(span)
val endSpan = spanned.getSpanEnd(span)
@ -37,7 +36,7 @@ fun htmlToAnnotatedString(html: String): AnnotatedString {
}
}
fun ParcelableSpan.toSpanStyle(): SpanStyle {
fun Any.toSpanStyle(): SpanStyle {
return when (this) {
is android.text.style.StyleSpan -> {
when (style) {