Add default space description to public space cards when no topic has been set

This commit is contained in:
Kelrap 2025-06-10 10:13:02 -04:00
parent a31aed9f08
commit 2073bf9f6d
2 changed files with 18 additions and 18 deletions

View file

@ -221,17 +221,17 @@ class PublicRoomBottomSheetState extends State<PublicRoomBottomSheet> {
),
],
),
if (chunk?.topic != null)
Flexible(
child: SingleChildScrollView(
child: Text(
chunk!.topic!,
softWrap: true,
textAlign: TextAlign.start,
maxLines: null,
),
Flexible(
child: SingleChildScrollView(
child: Text(
chunk?.topic ??
L10n.of(context).noSpaceDescriptionYet,
softWrap: true,
textAlign: TextAlign.start,
maxLines: null,
),
),
),
],
),
),

View file

@ -123,16 +123,16 @@ class PublicSpaceCard extends StatelessWidget {
),
],
),
if (space.topic != null)
Flexible(
child: Text(
space.topic!,
style: theme.textTheme.bodySmall,
overflow: TextOverflow.ellipsis,
textAlign: TextAlign.start,
maxLines: 5,
),
Flexible(
child: Text(
space.topic ??
L10n.of(context).noSpaceDescriptionYet,
style: theme.textTheme.bodySmall,
overflow: TextOverflow.ellipsis,
textAlign: TextAlign.start,
maxLines: 5,
),
),
],
),
),