mod: 评论链接跳转视频

This commit is contained in:
guozhigq
2023-08-27 14:22:12 +08:00
parent e8cd0d5330
commit a1900c7362
3 changed files with 39 additions and 9 deletions

View File

@ -602,9 +602,26 @@ InlineSpan buildContent(
color: Theme.of(context).colorScheme.primary,
),
recognizer: TapGestureRecognizer()
..onTap = () => Get.toNamed('/searchResult', parameters: {
'keyword': content.jumpUrl[matchStr]['title']
}),
..onTap = () {
String appUrlSchema =
content.jumpUrl[matchStr]['app_url_schema'];
if (appUrlSchema == '') {
Get.toNamed(
'/webview',
parameters: {
'url': matchStr,
'type': 'url',
'pageTitle': ''
},
);
} else {
if (appUrlSchema.startsWith('bilibili://search')) {
Get.toNamed('/searchResult', parameters: {
'keyword': content.jumpUrl[matchStr]['title']
});
}
}
},
),
);
spanChilds.add(