Keep image markers after retention trimming

This commit is contained in:
ajp_anton
2026-07-27 17:24:15 +00:00
parent a72c6b9437
commit d09fb4fa09
2 changed files with 16 additions and 16 deletions
@@ -183,20 +183,24 @@ class ViewLogsFragment : Fragment(R.layout.fragment_view_logs) {
})
}
if (expanded && row.entry.imageId != null) {
val image = ImageView(context).apply {
adjustViewBounds = true
maxHeight = dp(240)
contentDescription = "Notification image"
setPadding(0, dp(4), 0, 0)
}
addView(image)
val imageId = row.entry.imageId
val appContext = requireContext().applicationContext
val contentsContainer = this
Thread {
EncryptedImageStore(appContext).read(imageId)?.let { bytes ->
BitmapFactory.decodeByteArray(bytes, 0, bytes.size)
}?.let { bitmap ->
activity?.runOnUiThread { if (image.isAttachedToWindow) image.setImageBitmap(bitmap) }
activity?.runOnUiThread {
if (contentsContainer.isAttachedToWindow) {
contentsContainer.addView(ImageView(contentsContainer.context).apply {
setImageBitmap(bitmap)
adjustViewBounds = true
maxHeight = dp(240)
contentDescription = "Notification image"
setPadding(0, dp(4), 0, 0)
})
}
}
}
}.start()
}