Keep image markers after retention trimming
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user