show feed name in post subtext

This commit is contained in:
Jan 2022-12-30 00:44:54 +01:00
parent e610286d69
commit 95c82092f8
Signed by: Lea
GPG key ID: 1BAFFE8347019C42

View file

@ -34,14 +34,19 @@ class HomepagePost extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(post.title, style: Theme.of(context).textTheme.titleMedium, overflow: TextOverflow.ellipsis),
Row(
children: [
post.author.isNotEmpty
? Text(post.author)
: const Text('Unknown author', style: TextStyle(fontStyle: FontStyle.italic)),
const Text(' \u2022 '),
Text(formatDate(post.createdOnTime)),
],
ClipRRect(
clipBehavior: Clip.antiAlias,
child: Row(
children: [
Text('${post.api.cache.feeds.get(post.feedId)?.title}'),
const Text(' \u2022 '),
post.author.isNotEmpty
? Text(post.author)
: const Text('Unknown author', style: TextStyle(fontStyle: FontStyle.italic)),
const Text(' \u2022 '),
Text(formatDate(post.createdOnTime)),
],
),
),
],
),