From a5231a55b8c43749fd0439612556f95701ee1cb2 Mon Sep 17 00:00:00 2001 From: dom Date: Mon, 9 Mar 2026 19:09:42 +0800 Subject: [PATCH] fix dyn with title only Signed-off-by: dom --- lib/pages/dynamics/widgets/rich_node_panel.dart | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/lib/pages/dynamics/widgets/rich_node_panel.dart b/lib/pages/dynamics/widgets/rich_node_panel.dart index cfd55ea69..ab2d2f746 100644 --- a/lib/pages/dynamics/widgets/rich_node_panel.dart +++ b/lib/pages/dynamics/widgets/rich_node_panel.dart @@ -41,12 +41,19 @@ TextSpan? richNode( // 动态页面 richTextNodes 层级可能与主页动态层级不同 richTextNodes = summary?.richTextNodes; if (title != null && title.isNotEmpty) { - spanChildren.add( - TextSpan( - text: '$title\n', + if (richTextNodes == null || richTextNodes.isEmpty) { + return TextSpan( + text: title, style: const TextStyle(fontWeight: FontWeight.bold), - ), - ); + ); + } else { + spanChildren.add( + TextSpan( + text: '$title\n', + style: const TextStyle(fontWeight: FontWeight.bold), + ), + ); + } } }