remove attachments at pressing X
This commit is contained in:
parent
5fb6d81586
commit
2166a5bbe2
1 changed files with 7 additions and 0 deletions
|
|
@ -330,6 +330,13 @@ class ThreadActivity : SimpleActivity() {
|
||||||
thread_attachments_holder.beVisible()
|
thread_attachments_holder.beVisible()
|
||||||
val attachmentView = layoutInflater.inflate(R.layout.item_attachment, null).apply {
|
val attachmentView = layoutInflater.inflate(R.layout.item_attachment, null).apply {
|
||||||
thread_attachments_wrapper.addView(this)
|
thread_attachments_wrapper.addView(this)
|
||||||
|
thread_remove_attachment.setOnClickListener {
|
||||||
|
thread_attachments_wrapper.removeView(this)
|
||||||
|
attachmentUris.remove(uri)
|
||||||
|
if (attachmentUris.isEmpty()) {
|
||||||
|
thread_attachments_holder.beGone()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val roundedCornersRadius = resources.getDimension(R.dimen.medium_margin).toInt()
|
val roundedCornersRadius = resources.getDimension(R.dimen.medium_margin).toInt()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue