mirror of
https://github.com/easychen/pushdeer.git
synced 2024-11-01 08:09:19 +08:00
android: Fix list updating for image and QR code
This commit is contained in:
parent
c6caf87a0a
commit
4673418d95
@ -136,15 +136,16 @@ fun KeyItem(key: PushKey, requestHolder: RequestHolder) {
|
|||||||
) {
|
) {
|
||||||
AndroidView(
|
AndroidView(
|
||||||
factory = {
|
factory = {
|
||||||
ImageView(it).apply {
|
ImageView(it)
|
||||||
this.setImageBitmap(
|
},
|
||||||
QRCodeGenerator(
|
update = { view ->
|
||||||
key.key,
|
view.setImageBitmap(
|
||||||
400.dp.value.toInt(),
|
QRCodeGenerator(
|
||||||
400.dp.value.toInt()
|
key.key,
|
||||||
).qrCode
|
400.dp.value.toInt(),
|
||||||
)
|
400.dp.value.toInt()
|
||||||
}
|
).qrCode
|
||||||
|
)
|
||||||
},
|
},
|
||||||
modifier = Modifier.align(alignment = Alignment.Center)
|
modifier = Modifier.align(alignment = Alignment.Center)
|
||||||
)
|
)
|
||||||
|
@ -137,12 +137,17 @@ fun ImageMessageItem(message: MessageEntity, requestHolder: RequestHolder) {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
Card(modifier = Modifier.fillMaxWidth()) {
|
Card(modifier = Modifier.fillMaxWidth()) {
|
||||||
AndroidView(factory = {
|
AndroidView(
|
||||||
ImageView(it).apply {
|
factory = {
|
||||||
scaleType = ImageView.ScaleType.FIT_CENTER
|
ImageView(it).apply {
|
||||||
load(message.text, requestHolder.coilImageLoader)
|
scaleType = ImageView.ScaleType.FIT_CENTER
|
||||||
}
|
}
|
||||||
}, modifier = Modifier.fillMaxWidth())
|
},
|
||||||
|
update = { view ->
|
||||||
|
view.load(message.text, requestHolder.coilImageLoader)
|
||||||
|
},
|
||||||
|
modifier = Modifier.fillMaxWidth()
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user