mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-27 12:05:22 +00:00
Fix QR code
This commit is contained in:
parent
6ee2a6e0a9
commit
9eb7316c20
@ -26,6 +26,7 @@ import androidx.compose.ui.graphics.Color
|
|||||||
import androidx.compose.ui.graphics.ColorFilter
|
import androidx.compose.ui.graphics.ColorFilter
|
||||||
import androidx.compose.ui.graphics.FilterQuality
|
import androidx.compose.ui.graphics.FilterQuality
|
||||||
import androidx.compose.ui.graphics.asImageBitmap
|
import androidx.compose.ui.graphics.asImageBitmap
|
||||||
|
import androidx.compose.ui.graphics.toArgb
|
||||||
import androidx.compose.ui.layout.ContentScale
|
import androidx.compose.ui.layout.ContentScale
|
||||||
import androidx.compose.ui.res.painterResource
|
import androidx.compose.ui.res.painterResource
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
@ -46,7 +47,7 @@ fun QrImage(
|
|||||||
mutableStateOf(null)
|
mutableStateOf(null)
|
||||||
}
|
}
|
||||||
|
|
||||||
val dark = LocalColors.current.onBackgroundLight.value.toInt()
|
val dark = LocalColors.current.onBackgroundLight.toArgb()
|
||||||
|
|
||||||
val scope = rememberCoroutineScope()
|
val scope = rememberCoroutineScope()
|
||||||
LaunchedEffect(string) {
|
LaunchedEffect(string) {
|
||||||
@ -58,13 +59,13 @@ fun QrImage(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (LocalColors.current.isLight) {
|
if (LocalColors.current.isLight) {
|
||||||
Content(bitmap, icon, modifier = modifier, backgroundColor = LocalColors.current.backgroundSecondary)
|
Content(bitmap, icon, modifier = modifier, backgroundColor = LocalColors.current.backgroundLight)
|
||||||
} else {
|
} else {
|
||||||
Card(
|
Card(
|
||||||
backgroundColor = Color.White,
|
backgroundColor = LocalColors.current.backgroundLight,
|
||||||
elevation = 0.dp,
|
elevation = 0.dp,
|
||||||
modifier = modifier
|
modifier = modifier
|
||||||
) { Content(bitmap, icon, modifier = Modifier.padding(16.dp), backgroundColor = Color.White) }
|
) { Content(bitmap, icon, modifier = Modifier.padding(16.dp), backgroundColor = LocalColors.current.backgroundLight) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user