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

pull/2245/head
Kelrap 5 months ago
parent a31aed9f08
commit 2073bf9f6d

@ -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,
),
),
),
],
),
),

@ -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,
),
),
],
),
),

Loading…
Cancel
Save