feat: Allow empty document titles, fix saved view routes not being accessible

This commit is contained in:
Anton Stubenbord
2023-10-10 16:28:10 +02:00
parent 2e32f0c015
commit 7b9c31a010
19 changed files with 278 additions and 300 deletions

View File

@@ -111,7 +111,7 @@ class DocumentDetailedItem extends DocumentItem {
],
).paddedLTRB(8, 8, 8, 4),
Text(
document.title ?? '-',
document.title.isEmpty ? '-' : document.title,
style: Theme.of(context).textTheme.titleMedium,
maxLines: 2,
overflow: TextOverflow.ellipsis,

View File

@@ -113,7 +113,7 @@ class DocumentGridItem extends DocumentItem {
Padding(
padding: const EdgeInsets.only(bottom: 8.0),
child: Text(
document.title ?? '-',
document.title.isEmpty ? '-' : document.title,
maxLines: 3,
overflow: TextOverflow.ellipsis,
style: Theme.of(context).textTheme.titleMedium,

View File

@@ -58,7 +58,7 @@ class DocumentListItem extends DocumentItem {
],
),
Text(
document.title ?? '-',
document.title.isEmpty ? '-' : document.title,
overflow: TextOverflow.ellipsis,
maxLines: 1,
),