fix: include format in rqr cbor
Signed-off-by: Infi <infi@infi.sh>
This commit is contained in:
parent
2d76949644
commit
c5c7f8e9da
|
|
@ -9,7 +9,7 @@ import kotlin.io.encoding.ExperimentalEncodingApi
|
|||
|
||||
@Serializable
|
||||
data class UserQRContents(
|
||||
val format: String = "rqr\$user\$0",
|
||||
val format: String,
|
||||
val avatar: String,
|
||||
val displayName: String,
|
||||
val username: String,
|
||||
|
|
@ -24,6 +24,7 @@ object UserQR {
|
|||
RevoltCbor.encodeToByteArray(
|
||||
UserQRContents.serializer(),
|
||||
UserQRContents(
|
||||
format = "rqr\$user\$0",
|
||||
avatar = user.avatar?.id
|
||||
?: "01JDZRBY95P8AY4CFVX16FFVWS", // Sentinel value for missing avatar
|
||||
displayName = user.displayName
|
||||
|
|
|
|||
|
|
@ -46,7 +46,6 @@ import androidx.compose.ui.text.font.Font
|
|||
import androidx.compose.ui.text.font.FontFamily
|
||||
import androidx.compose.ui.text.font.FontVariation
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.text.rememberTextMeasurer
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import androidx.constraintlayout.compose.ConstraintLayout
|
||||
|
|
@ -77,8 +76,6 @@ fun UserCard(
|
|||
) {
|
||||
val context = LocalContext.current
|
||||
|
||||
val textMeasurer = rememberTextMeasurer()
|
||||
|
||||
var palette by remember { mutableStateOf<Palette?>(null) }
|
||||
LaunchedEffect(user) {
|
||||
val avatarUrl = ResourceLocations.userAvatarUrl(user)
|
||||
|
|
@ -196,7 +193,7 @@ fun UserCard(
|
|||
?: Color(0xFFFF005C), shape = MaterialTheme.shapes.medium)
|
||||
.padding(16.dp)
|
||||
) {
|
||||
val (heading, nameLabel, name, usernameLabel, username, tagLabel, tag, joinDateLabel, joinDate, qrLabel, qr, photoLabel, photo, url) = createRefs()
|
||||
val (heading, nameLabel, name, usernameLabel, username, joinDateLabel, joinDate, qrLabel, qr, photoLabel, photo, url) = createRefs()
|
||||
|
||||
Image(
|
||||
painter = painterResource(R.drawable.usercard_heading),
|
||||
|
|
|
|||
Loading…
Reference in New Issue