mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
fix: reply cv jump
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -257,6 +257,7 @@ class ArticlePanelController extends GetxController {
|
|||||||
showModalBottomSheet(
|
showModalBottomSheet(
|
||||||
context: context,
|
context: context,
|
||||||
isScrollControlled: true,
|
isScrollControlled: true,
|
||||||
|
backgroundColor: Theme.of(context).colorScheme.surface,
|
||||||
builder: (context) => SingleChildScrollView(
|
builder: (context) => SingleChildScrollView(
|
||||||
child: Container(
|
child: Container(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
|
|||||||
@@ -184,6 +184,7 @@ class UserPanelController extends GetxController {
|
|||||||
showModalBottomSheet(
|
showModalBottomSheet(
|
||||||
context: context,
|
context: context,
|
||||||
isScrollControlled: true,
|
isScrollControlled: true,
|
||||||
|
backgroundColor: Theme.of(context).colorScheme.surface,
|
||||||
builder: (context) => SingleChildScrollView(
|
builder: (context) => SingleChildScrollView(
|
||||||
child: Container(
|
child: Container(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
|
|||||||
@@ -251,6 +251,7 @@ class VideoPanelController extends GetxController {
|
|||||||
showModalBottomSheet(
|
showModalBottomSheet(
|
||||||
context: context,
|
context: context,
|
||||||
isScrollControlled: true,
|
isScrollControlled: true,
|
||||||
|
backgroundColor: Theme.of(context).colorScheme.surface,
|
||||||
builder: (context) => StatefulBuilder(
|
builder: (context) => StatefulBuilder(
|
||||||
builder: (context, setState) {
|
builder: (context, setState) {
|
||||||
Widget dateWidget([bool isFirst = true]) {
|
Widget dateWidget([bool isFirst = true]) {
|
||||||
|
|||||||
@@ -837,17 +837,19 @@ class ReplyItem extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
recognizer: TapGestureRecognizer()
|
recognizer: TapGestureRecognizer()
|
||||||
..onTap = () async {
|
..onTap = () async {
|
||||||
late final String title = content.url[matchStr]!.title;
|
late final String title =
|
||||||
|
content.jumpUrl[matchStr]['title'];
|
||||||
if (appUrlSchema == '') {
|
if (appUrlSchema == '') {
|
||||||
if (RegExp(r'^(av|bv)', caseSensitive: false)
|
if (RegExp(r'^(av|bv)', caseSensitive: false)
|
||||||
.hasMatch(matchStr)) {
|
.hasMatch(matchStr)) {
|
||||||
UrlUtils.matchUrlPush(matchStr, '');
|
UrlUtils.matchUrlPush(matchStr, '');
|
||||||
} else if (RegExp(r'^[Cc][Vv][0-9]+$')
|
} else if (RegExp(r'^cv\d+$', caseSensitive: false)
|
||||||
.hasMatch(matchStr)) {
|
.hasMatch(matchStr)) {
|
||||||
|
String cvid = 'cv${matchStr.substring(2)}';
|
||||||
Get.toNamed('/htmlRender', parameters: {
|
Get.toNamed('/htmlRender', parameters: {
|
||||||
'url': 'https://www.bilibili.com/read/$matchStr',
|
'url': 'https://www.bilibili.com/read/$cvid',
|
||||||
'title': title,
|
'title': title,
|
||||||
'id': matchStr,
|
'id': cvid,
|
||||||
'dynamicType': 'read'
|
'dynamicType': 'read'
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -882,12 +882,13 @@ class ReplyItemGrpc extends StatelessWidget {
|
|||||||
if (RegExp(r'^(av|bv)', caseSensitive: false)
|
if (RegExp(r'^(av|bv)', caseSensitive: false)
|
||||||
.hasMatch(matchStr)) {
|
.hasMatch(matchStr)) {
|
||||||
UrlUtils.matchUrlPush(matchStr, '');
|
UrlUtils.matchUrlPush(matchStr, '');
|
||||||
} else if (RegExp(r'^[Cc][Vv][0-9]+$')
|
} else if (RegExp(r'^cv\d+$', caseSensitive: false)
|
||||||
.hasMatch(matchStr)) {
|
.hasMatch(matchStr)) {
|
||||||
|
String cvid = 'cv${matchStr.substring(2)}';
|
||||||
Get.toNamed('/htmlRender', parameters: {
|
Get.toNamed('/htmlRender', parameters: {
|
||||||
'url': 'https://www.bilibili.com/read/$matchStr',
|
'url': 'https://www.bilibili.com/read/$cvid',
|
||||||
'title': title,
|
'title': title,
|
||||||
'id': matchStr,
|
'id': cvid,
|
||||||
'dynamicType': 'read'
|
'dynamicType': 'read'
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user