From dc1451c3aff1b09d8b92e4c0691e8cff9d97e89e Mon Sep 17 00:00:00 2001 From: bggRGjQaUbCoE Date: Wed, 5 Mar 2025 17:57:51 +0800 Subject: [PATCH] opt: at me item Signed-off-by: bggRGjQaUbCoE --- lib/pages/msg_feed_top/at_me/view.dart | 29 ++++++++++++++------------ 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/lib/pages/msg_feed_top/at_me/view.dart b/lib/pages/msg_feed_top/at_me/view.dart index 2bda31476..0606086de 100644 --- a/lib/pages/msg_feed_top/at_me/view.dart +++ b/lib/pages/msg_feed_top/at_me/view.dart @@ -70,25 +70,28 @@ class _AtMePageState extends State { title: Text( "${loadingState.response[index].user?.nickname} " "在${loadingState.response[index].item?.business}中@了我", - style: Theme.of(context).textTheme.titleMedium!.copyWith( + style: Theme.of(context).textTheme.bodyMedium!.copyWith( color: Theme.of(context).colorScheme.primary, ), ), subtitle: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - const SizedBox(height: 4), - Text( - loadingState.response[index].item?.sourceContent ?? - "", - maxLines: 3, - overflow: TextOverflow.ellipsis, - style: Theme.of(context) - .textTheme - .bodyMedium! - .copyWith( - color: - Theme.of(context).colorScheme.outline)), + if ((loadingState.response[index].item?.sourceContent + as String?) + ?.isNotEmpty == + true) ...[ + const SizedBox(height: 4), + Text(loadingState.response[index].item?.sourceContent, + maxLines: 3, + overflow: TextOverflow.ellipsis, + style: Theme.of(context) + .textTheme + .bodyMedium! + .copyWith( + color: + Theme.of(context).colorScheme.outline)), + ], const SizedBox(height: 4), Text( Utils.dateFormat(loadingState.response[index].atTime),