mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-06-01 00:28:18 +08:00
fix: push bilibili://comment/msg_fold
Closes #576 Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -235,10 +235,10 @@ class PiliScheme {
|
|||||||
if (path.startsWith("/detail/")) {
|
if (path.startsWith("/detail/")) {
|
||||||
// bilibili://comment/detail/17/832703053858603029/238686570016/?subType=0&anchor=238686628816&showEnter=1&extraIntentId=0&scene=1&enterName=%E6%9F%A5%E7%9C%8B%E5%8A%A8%E6%80%81%E8%AF%A6%E6%83%85&enterUri=bilibili://following/detail/832703053858603029
|
// bilibili://comment/detail/17/832703053858603029/238686570016/?subType=0&anchor=238686628816&showEnter=1&extraIntentId=0&scene=1&enterName=%E6%9F%A5%E7%9C%8B%E5%8A%A8%E6%80%81%E8%AF%A6%E6%83%85&enterUri=bilibili://following/detail/832703053858603029
|
||||||
List<String> pathSegments = uri.pathSegments;
|
List<String> pathSegments = uri.pathSegments;
|
||||||
int type = int.parse(pathSegments[1]);
|
int type = int.parse(pathSegments[1]); // business_id
|
||||||
int oid = int.parse(pathSegments[2]);
|
int oid = int.parse(pathSegments[2]); // subject_id
|
||||||
int rootId = int.parse(pathSegments[3]);
|
int rootId = int.parse(pathSegments[3]); // root_id // target_id
|
||||||
int? rpId = uri.queryParameters['anchor'] != null
|
int? rpId = uri.queryParameters['anchor'] != null // source_id
|
||||||
? int.tryParse(uri.queryParameters['anchor']!)
|
? int.tryParse(uri.queryParameters['anchor']!)
|
||||||
: null;
|
: null;
|
||||||
// int subType = int.parse(value.queryParameters['subType'] ?? '0');
|
// int subType = int.parse(value.queryParameters['subType'] ?? '0');
|
||||||
@@ -277,9 +277,47 @@ class PiliScheme {
|
|||||||
);
|
);
|
||||||
return true;
|
return true;
|
||||||
} else if (path.startsWith("/msg_fold/")) {
|
} else if (path.startsWith("/msg_fold/")) {
|
||||||
// bilibili://comment/msg_fold/1/22222/33333/11111/?enterUri=bilibili://video/22222
|
// bilibili://comment/msg_fold/1/22222/33333/11111/?enterUri=bilibili://video/22222 //(aid)
|
||||||
// bilibili://comment/msg_fold/11/22222/33333/11111/?enterUri=bilibili://following/detail/44444
|
// bilibili://comment/msg_fold/11/22222/33333/11111/?enterUri=bilibili://following/detail/44444 //(oid)
|
||||||
|
List<String> pathSegments = uri.pathSegments;
|
||||||
|
int type = int.parse(pathSegments[1]); // business_id
|
||||||
|
int oid = int.parse(pathSegments[2]); // subject_id
|
||||||
|
int rpId = int.parse(pathSegments[3]); // source_id
|
||||||
|
Get.to(
|
||||||
|
() => Scaffold(
|
||||||
|
resizeToAvoidBottomInset: false,
|
||||||
|
appBar: AppBar(
|
||||||
|
title: const Text('评论详情'),
|
||||||
|
actions: [
|
||||||
|
IconButton(
|
||||||
|
tooltip: '前往',
|
||||||
|
onPressed: () {
|
||||||
|
String? enterUri = uri.queryParameters['enterUri'];
|
||||||
|
if (enterUri != null) {
|
||||||
|
routePush(Uri.parse(enterUri), businessId: type);
|
||||||
|
} else {
|
||||||
|
routePush(
|
||||||
|
Uri.parse('bilibili://following/detail/$oid'),
|
||||||
|
businessId: type,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
icon: const Icon(Icons.open_in_new),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
body: VideoReplyReplyPanel(
|
||||||
|
oid: oid,
|
||||||
|
rpid: rpId,
|
||||||
|
source: 'routePush',
|
||||||
|
replyType: ReplyType.values[type],
|
||||||
|
firstFloor: null,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
case 'following':
|
case 'following':
|
||||||
// bilibili://following/detail/832703053858603029
|
// bilibili://following/detail/832703053858603029
|
||||||
|
|||||||
Reference in New Issue
Block a user