mirror of
https://github.com/anyproto/anytype-kotlin.git
synced 2025-06-08 13:57:10 +09:00
DROID-932 | Fixed lock icon on relations list (#3045)
DROID-932 Relations List | Fix | Fixed lock icon on relations list for description relation
This commit is contained in:
parent
5b1bb5d548
commit
34bc1f864c
1 changed files with 8 additions and 8 deletions
|
@ -49,7 +49,7 @@ sealed class ListRelationViewHolder(
|
|||
}
|
||||
}
|
||||
}
|
||||
setSystemIcon(systemIcon, item.system)
|
||||
setLockIcon(systemIcon, item.readOnly)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -63,7 +63,7 @@ sealed class ListRelationViewHolder(
|
|||
fun bind(item: ObjectRelationView.Checkbox) = with(itemView) {
|
||||
tvTitle.text = item.name
|
||||
ivCheckbox.isSelected = item.isChecked
|
||||
setSystemIcon(systemIcon, item.system)
|
||||
setLockIcon(systemIcon, item.system)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -91,7 +91,7 @@ sealed class ListRelationViewHolder(
|
|||
text = null
|
||||
}
|
||||
}
|
||||
setSystemIcon(systemIcon, item.system)
|
||||
setLockIcon(systemIcon, item.system)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -109,7 +109,7 @@ sealed class ListRelationViewHolder(
|
|||
} else {
|
||||
placeholder.gone()
|
||||
}
|
||||
setSystemIcon(systemIcon, item.system)
|
||||
setLockIcon(systemIcon, item.system)
|
||||
for (i in 0..MAX_VISIBLE_TAGS_INDEX) getViewByIndex(i)?.gone()
|
||||
item.tags.forEachIndexed { index, tagView ->
|
||||
when (index) {
|
||||
|
@ -151,7 +151,7 @@ sealed class ListRelationViewHolder(
|
|||
} else {
|
||||
placeholder.gone()
|
||||
}
|
||||
setSystemIcon(systemIcon, item.system)
|
||||
setLockIcon(systemIcon, item.system)
|
||||
for (i in 0..MAX_VISIBLE_OBJECTS_INDEX) getViewByIndex(i)?.gone()
|
||||
item.objects.forEachIndexed { index, objectView ->
|
||||
when (index) {
|
||||
|
@ -198,7 +198,7 @@ sealed class ListRelationViewHolder(
|
|||
} else {
|
||||
placeholder.gone()
|
||||
}
|
||||
setSystemIcon(systemIcon, item.system)
|
||||
setLockIcon(systemIcon, item.system)
|
||||
item.files.forEachIndexed { index, fileView ->
|
||||
when (index) {
|
||||
in 0..MAX_VISIBLE_FILES_INDEX -> {
|
||||
|
@ -239,8 +239,8 @@ sealed class ListRelationViewHolder(
|
|||
itemView.setBlockBackgroundColor(color)
|
||||
}
|
||||
|
||||
fun setSystemIcon(view: View, isSystem: Boolean) {
|
||||
if (isSystem) {
|
||||
fun setLockIcon(view: View, isReadOnly: Boolean) {
|
||||
if (isReadOnly) {
|
||||
view.visible()
|
||||
} else {
|
||||
view.gone()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue