1
0
Fork 0
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:
Konstantin Ivanov 2025-01-29 14:00:34 +01:00 committed by konstantiniiv
parent 65e07fba6f
commit 599ecb0fc5
2 changed files with 15 additions and 0 deletions

View file

@ -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)
}

View file

@ -28,4 +28,10 @@ class GridCellFileItem @JvmOverloads constructor(
ivIcon.gone()
}
}
fun clear() {
binding.tvName.text = null
binding.tvName.gone()
binding.ivIcon.gone()
}
}