From bcd0d63db7f0dd59414670d40eed3cdb98c6c277 Mon Sep 17 00:00:00 2001 From: bggRGjQaUbCoE Date: Thu, 8 May 2025 16:42:18 +0800 Subject: [PATCH] opt: dyn panel Signed-off-by: bggRGjQaUbCoE --- lib/pages/dynamics/widgets/content_panel.dart | 9 +++++---- lib/pages/dynamics/widgets/forward_panel.dart | 16 ++++++++++++++++ lib/pages/dynamics_topic/view.dart | 2 +- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/lib/pages/dynamics/widgets/content_panel.dart b/lib/pages/dynamics/widgets/content_panel.dart index c6ef7b96..5146098a 100644 --- a/lib/pages/dynamics/widgets/content_panel.dart +++ b/lib/pages/dynamics/widgets/content_panel.dart @@ -57,7 +57,10 @@ Widget content( }, child: Text( '#${item.modules.moduleDynamic!.topic!.name}', - style: TextStyle(color: theme.colorScheme.primary), + style: TextStyle( + fontSize: 15, + color: theme.colorScheme.primary, + ), ), ), ], @@ -65,9 +68,7 @@ Widget content( source == 'detail' ? SelectableText.rich( richNodes, - style: !isSave - ? const TextStyle(fontSize: 16) - : const TextStyle(fontSize: 15), + style: const TextStyle(fontSize: 15), ) : Text.rich( style: const TextStyle(fontSize: 15), diff --git a/lib/pages/dynamics/widgets/forward_panel.dart b/lib/pages/dynamics/widgets/forward_panel.dart index 0737405a..3b94e5e5 100644 --- a/lib/pages/dynamics/widgets/forward_panel.dart +++ b/lib/pages/dynamics/widgets/forward_panel.dart @@ -92,6 +92,22 @@ Widget forWard( ], ), const SizedBox(height: 2), + if (item.modules.moduleDynamic?.topic != null) + GestureDetector( + onTap: () { + Get.toNamed( + '/dynTopic', + parameters: { + 'id': item.modules.moduleDynamic!.topic!.id!.toString(), + 'name': item.modules.moduleDynamic!.topic!.name!, + }, + ); + }, + child: Text( + '#${item.modules.moduleDynamic!.topic!.name}', + style: TextStyle(color: theme.colorScheme.primary), + ), + ), if (richNodes != null) Text.rich( richNodes, diff --git a/lib/pages/dynamics_topic/view.dart b/lib/pages/dynamics_topic/view.dart index a51ef3e8..ffa5dab6 100644 --- a/lib/pages/dynamics_topic/view.dart +++ b/lib/pages/dynamics_topic/view.dart @@ -113,7 +113,7 @@ class _DynTopicPageState extends State { _controller.onLoadMore(); } final item = loadingState.response![index]; - if (item.topicType != null) { + if (item.dynamicCardItem != null) { return DynamicPanel( item: item.dynamicCardItem!, );