improvement: Add a section name for attachments on the New item screen

This commit is contained in:
Artem Chepurnoy 2024-04-17 11:32:46 +03:00
parent 5bcfb9aee1
commit d839363cf4
No known key found for this signature in database
GPG Key ID: FAC37D0CF674043E

View File

@ -440,11 +440,15 @@ fun produceAddScreenState(
initialType = { "attachment" },
factories = attachmentsFactories,
afterList = {
// val header = AddStateItem.Section(
// id = "attachment.section",
// text = "Attachments",
// )
// add(0, header)
if (this.isEmpty()) {
return@foo3
}
val header = AddStateItem.Section(
id = "attachment.section",
text = translate(Res.strings.attachments),
)
add(0, header)
},
extra = {
val action = FlatItemAction(