mirror of
https://github.com/anyproto/anytype-kotlin.git
synced 2025-06-08 13:57:10 +09:00
DROID-2794 Widgets | Fix | Untitled objects (#1890)
This commit is contained in:
parent
441a5118fb
commit
77c89dd434
2 changed files with 6 additions and 16 deletions
|
@ -544,14 +544,8 @@ private fun GalleryWidgetItemCard(
|
|||
.padding(start = 12.dp, top = 9.dp),
|
||||
onTaskIconClicked = {}
|
||||
)
|
||||
val prettyPrintName = item.name.prettyPrintName
|
||||
val name = if (prettyPrintName.isNullOrEmpty()) {
|
||||
stringResource(id = R.string.untitled)
|
||||
} else {
|
||||
prettyPrintName
|
||||
}
|
||||
Text(
|
||||
text = name,
|
||||
text = item.name.prettyPrintName.ifEmpty { stringResource(id = R.string.untitled) },
|
||||
maxLines = 2,
|
||||
overflow = TextOverflow.Ellipsis,
|
||||
style = Caption1Medium,
|
||||
|
@ -566,14 +560,8 @@ private fun GalleryWidgetItemCard(
|
|||
)
|
||||
}
|
||||
} else {
|
||||
val prettyPrintName = item.name.prettyPrintName
|
||||
val name = if (prettyPrintName.isNullOrEmpty()) {
|
||||
stringResource(id = R.string.untitled)
|
||||
} else {
|
||||
prettyPrintName
|
||||
}
|
||||
Text(
|
||||
text = name,
|
||||
text = item.name.prettyPrintName.ifEmpty { stringResource(id = R.string.untitled) },
|
||||
maxLines = 2,
|
||||
overflow = TextOverflow.Ellipsis,
|
||||
style = Caption1Medium,
|
||||
|
|
|
@ -161,13 +161,15 @@ fun CompactListWidgetList(
|
|||
ListWidgetObjectIcon(
|
||||
iconSize = 18.dp,
|
||||
icon = element.objectIcon,
|
||||
modifier = Modifier.align(Alignment.CenterVertically).padding(start = 0.dp, end = 4.dp),
|
||||
modifier = Modifier
|
||||
.align(Alignment.CenterVertically)
|
||||
.padding(start = 0.dp, end = 4.dp),
|
||||
onTaskIconClicked = { isChecked ->
|
||||
onObjectCheckboxClicked(element.obj.id, isChecked)
|
||||
}
|
||||
)
|
||||
Text(
|
||||
text = element.name.prettyPrintName ?: stringResource(id = R.string.untitled),
|
||||
text = element.name.prettyPrintName.ifEmpty { stringResource(id = R.string.untitled) },
|
||||
modifier = Modifier
|
||||
.padding(start = 8.dp)
|
||||
.fillMaxWidth(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue