mirror of
https://github.com/anyproto/anytype-kotlin.git
synced 2025-06-08 05:47:05 +09:00
DROID-3295 Editor | Fix | Proper update of the file relations (#2043)
This commit is contained in:
parent
65e07fba6f
commit
599ecb0fc5
2 changed files with 15 additions and 0 deletions
|
@ -407,6 +407,7 @@ sealed class RelationBlockViewHolder(
|
|||
|
||||
override fun applyRelationValue(item: ObjectRelationView) {
|
||||
if (item is ObjectRelationView.File) {
|
||||
clearAllViews()
|
||||
if (item.files.isEmpty()) {
|
||||
placeholder.visible()
|
||||
} else {
|
||||
|
@ -432,6 +433,14 @@ sealed class RelationBlockViewHolder(
|
|||
else -> null
|
||||
}
|
||||
|
||||
private fun clearAllViews() {
|
||||
with(binding) {
|
||||
file0.clear()
|
||||
file1.clear()
|
||||
file2.clear()
|
||||
}
|
||||
}
|
||||
|
||||
override fun indentize(item: BlockView.Indentable) {
|
||||
indent(item, itemView)
|
||||
}
|
||||
|
|
|
@ -28,4 +28,10 @@ class GridCellFileItem @JvmOverloads constructor(
|
|||
ivIcon.gone()
|
||||
}
|
||||
}
|
||||
|
||||
fun clear() {
|
||||
binding.tvName.text = null
|
||||
binding.tvName.gone()
|
||||
binding.ivIcon.gone()
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue