From ff871943cf0e7b549f6e12e40fa898da26fc82bb Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Sun, 17 Aug 2025 02:56:12 +0800 Subject: [PATCH] :sparkles: Show realm post indicator --- lib/widgets/post/post_shared.dart | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/lib/widgets/post/post_shared.dart b/lib/widgets/post/post_shared.dart index 356bab97..c884651c 100644 --- a/lib/widgets/post/post_shared.dart +++ b/lib/widgets/post/post_shared.dart @@ -571,12 +571,38 @@ class PostHeader extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Row( + crossAxisAlignment: CrossAxisAlignment.center, spacing: 4, children: [ Text(item.publisher.nick).bold(), if (item.publisher.verification != null) VerificationMark(mark: item.publisher.verification!), - Text('@${item.publisher.name}').fontSize(11), + if (item.realm == null) + Text('@${item.publisher.name}').fontSize(11) + else + ...([ + const Icon(Symbols.arrow_right, size: 14), + InkWell( + child: Row( + mainAxisSize: MainAxisSize.min, + spacing: 5, + children: [ + Text(item.realm!.name), + ProfilePictureWidget( + file: item.realm!.picture, + fallbackIcon: Symbols.group, + radius: 9, + ), + ], + ), + onTap: () { + GoRouter.of(context).pushNamed( + 'realmDetail', + pathParameters: {'slug': item.realm!.slug}, + ); + }, + ), + ]), ], ), Row(