fix: reply cv jump

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-02-10 13:14:40 +08:00
parent 0f63976a00
commit abd01e1a27
5 changed files with 13 additions and 7 deletions

View File

@@ -837,17 +837,19 @@ class ReplyItem extends StatelessWidget {
),
recognizer: TapGestureRecognizer()
..onTap = () async {
late final String title = content.url[matchStr]!.title;
late final String title =
content.jumpUrl[matchStr]['title'];
if (appUrlSchema == '') {
if (RegExp(r'^(av|bv)', caseSensitive: false)
.hasMatch(matchStr)) {
UrlUtils.matchUrlPush(matchStr, '');
} else if (RegExp(r'^[Cc][Vv][0-9]+$')
} else if (RegExp(r'^cv\d+$', caseSensitive: false)
.hasMatch(matchStr)) {
String cvid = 'cv${matchStr.substring(2)}';
Get.toNamed('/htmlRender', parameters: {
'url': 'https://www.bilibili.com/read/$matchStr',
'url': 'https://www.bilibili.com/read/$cvid',
'title': title,
'id': matchStr,
'id': cvid,
'dynamicType': 'read'
});
} else {

View File

@@ -882,12 +882,13 @@ class ReplyItemGrpc extends StatelessWidget {
if (RegExp(r'^(av|bv)', caseSensitive: false)
.hasMatch(matchStr)) {
UrlUtils.matchUrlPush(matchStr, '');
} else if (RegExp(r'^[Cc][Vv][0-9]+$')
} else if (RegExp(r'^cv\d+$', caseSensitive: false)
.hasMatch(matchStr)) {
String cvid = 'cv${matchStr.substring(2)}';
Get.toNamed('/htmlRender', parameters: {
'url': 'https://www.bilibili.com/read/$matchStr',
'url': 'https://www.bilibili.com/read/$cvid',
'title': title,
'id': matchStr,
'id': cvid,
'dynamicType': 'read'
});
} else {