1
0
Fork 0
mirror of https://github.com/anyproto/anytype-kotlin.git synced 2025-06-08 05:47:05 +09:00

DROID-3453 Widgets | Enhancement | Add "Empty bin" action for the new "Bin" system widget (#2257)

This commit is contained in:
Evgenii Kozlov 2025-04-08 17:30:27 +02:00 committed by GitHub
parent db4ec70790
commit b942281592
Signed by: github
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 3 deletions

View file

@ -125,7 +125,11 @@ fun ListWidgetCard(
if (item.isLoading) {
EmptyWidgetPlaceholder(R.string.loading)
} else {
EmptyWidgetPlaceholder(R.string.this_widget_has_no_object)
if (item.type is Type.Bin) {
EmptyWidgetPlaceholder(R.string.bin_empty_title)
} else {
EmptyWidgetPlaceholder(R.string.this_widget_has_no_object)
}
}
Spacer(modifier = Modifier.height(2.dp))
}
@ -134,7 +138,8 @@ fun ListWidgetCard(
WidgetMenu(
isExpanded = isCardMenuExpanded,
onDropDownMenuAction = onDropDownMenuAction,
canEditWidgets = mode !is InteractionMode.Edit
canEditWidgets = mode !is InteractionMode.Edit,
canEmptyBin = item.elements.isNotEmpty() && item.type is Type.Bin
)
}
}

View file

@ -955,7 +955,7 @@
<string name="log_in">Log In</string>
<string name="create_object_section_library">Anytype Library</string>
<string name="bin_empty_title">Your trash is empty.</string>
<string name="bin_empty_title">Your bin is empty.</string>
<string name="bin_empty_subtitle">Looks like youre all tidy and organized!</string>