From 9657c7799945873c509b6d5c1d26997166cea17d Mon Sep 17 00:00:00 2001 From: bggRGjQaUbCoE Date: Sun, 9 Feb 2025 09:31:24 +0800 Subject: [PATCH] mod: push article Signed-off-by: bggRGjQaUbCoE --- lib/pages/video/detail/reply/widgets/reply_item.dart | 12 ++++++++++++ .../video/detail/reply/widgets/reply_item_grpc.dart | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/lib/pages/video/detail/reply/widgets/reply_item.dart b/lib/pages/video/detail/reply/widgets/reply_item.dart index f7687404..9f1424bc 100644 --- a/lib/pages/video/detail/reply/widgets/reply_item.dart +++ b/lib/pages/video/detail/reply/widgets/reply_item.dart @@ -852,6 +852,18 @@ class ReplyItem extends StatelessWidget { 'dynamicType': 'read' }); } else { + String? cvId = RegExp(r'/read/(cv\d+)') + .firstMatch(matchStr) + ?.group(1); + if (cvId != null) { + Get.toNamed('/htmlRender', parameters: { + 'url': matchStr, + 'title': title, + 'id': cvId, + 'dynamicType': 'read' + }); + return; + } final String redirectUrl = (await UrlUtils.parseRedirectUrl(matchStr)) ?? matchStr; diff --git a/lib/pages/video/detail/reply/widgets/reply_item_grpc.dart b/lib/pages/video/detail/reply/widgets/reply_item_grpc.dart index 816b6f9b..06f07faa 100644 --- a/lib/pages/video/detail/reply/widgets/reply_item_grpc.dart +++ b/lib/pages/video/detail/reply/widgets/reply_item_grpc.dart @@ -891,6 +891,18 @@ class ReplyItemGrpc extends StatelessWidget { 'dynamicType': 'read' }); } else { + String? cvId = RegExp(r'/read/(cv\d+)') + .firstMatch(matchStr) + ?.group(1); + if (cvId != null) { + Get.toNamed('/htmlRender', parameters: { + 'url': matchStr, + 'title': title, + 'id': cvId, + 'dynamicType': 'read' + }); + return; + } final String redirectUrl = (await UrlUtils.parseRedirectUrl(matchStr)) ?? matchStr;