fix dyn with title only

Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-03-09 19:09:42 +08:00
parent b8cae015d7
commit a5231a55b8

View File

@@ -41,6 +41,12 @@ TextSpan? richNode(
// 动态页面 richTextNodes 层级可能与主页动态层级不同 // 动态页面 richTextNodes 层级可能与主页动态层级不同
richTextNodes = summary?.richTextNodes; richTextNodes = summary?.richTextNodes;
if (title != null && title.isNotEmpty) { if (title != null && title.isNotEmpty) {
if (richTextNodes == null || richTextNodes.isEmpty) {
return TextSpan(
text: title,
style: const TextStyle(fontWeight: FontWeight.bold),
);
} else {
spanChildren.add( spanChildren.add(
TextSpan( TextSpan(
text: '$title\n', text: '$title\n',
@@ -49,6 +55,7 @@ TextSpan? richNode(
); );
} }
} }
}
if (richTextNodes == null || richTextNodes.isEmpty) { if (richTextNodes == null || richTextNodes.isEmpty) {
return null; return null;