opt: push following detail

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-03-31 16:38:58 +08:00
parent 909394965e
commit a9df8cd883
2 changed files with 9 additions and 4 deletions

View File

@@ -55,6 +55,7 @@ class _ReplyMePageState extends State<ReplyMePage> {
PiliScheme.routePushFromUrl( PiliScheme.routePushFromUrl(
nativeUri, nativeUri,
businessId: item.item?.businessId, businessId: item.item?.businessId,
oid: item.item?.subjectId,
); );
} }
}, },

View File

@@ -36,6 +36,7 @@ class PiliScheme {
bool off = false, bool off = false,
Map? parameters, Map? parameters,
int? businessId, int? businessId,
int? oid,
}) async { }) async {
try { try {
if (url.startsWith('//')) { if (url.startsWith('//')) {
@@ -49,6 +50,7 @@ class PiliScheme {
off: off, off: off,
parameters: parameters, parameters: parameters,
businessId: businessId, businessId: businessId,
oid: oid,
); );
} catch (_) { } catch (_) {
return false; return false;
@@ -62,6 +64,7 @@ class PiliScheme {
bool off = false, bool off = false,
Map? parameters, Map? parameters,
int? businessId, int? businessId,
int? oid,
}) async { }) async {
final String scheme = uri.scheme; final String scheme = uri.scheme;
final String host = uri.host.toLowerCase(); final String host = uri.host.toLowerCase();
@@ -323,13 +326,14 @@ class PiliScheme {
// businessId == 17 => dynId == oid // businessId == 17 => dynId == oid
// bilibili://following/detail/832703053858603029 (dynId) // bilibili://following/detail/832703053858603029 (dynId)
// bilibili://following/detail/12345678?comment_root_id=654321\u0026comment_on=1 // bilibili://following/detail/12345678?comment_root_id=654321\u0026comment_on=1
if (businessId == 17 && path.startsWith("/detail/")) { if ((oid != null || businessId == 17) &&
path.startsWith("/detail/")) {
final queryParameters = uri.queryParameters; final queryParameters = uri.queryParameters;
final commentRootId = queryParameters['comment_root_id']; final commentRootId = queryParameters['comment_root_id'];
if (commentRootId != null) { if (commentRootId != null) {
String? oid = uriDigitRegExp.firstMatch(path)?.group(1); String? dynId = uriDigitRegExp.firstMatch(path)?.group(1);
int? rpid = int.tryParse(commentRootId); int? rpid = int.tryParse(commentRootId);
if (oid != null && rpid != null) { if (dynId != null && rpid != null) {
Get.to( Get.to(
() => Scaffold( () => Scaffold(
resizeToAvoidBottomInset: false, resizeToAvoidBottomInset: false,
@@ -346,7 +350,7 @@ class PiliScheme {
], ],
), ),
body: VideoReplyReplyPanel( body: VideoReplyReplyPanel(
oid: int.parse(oid), oid: oid ?? int.parse(dynId),
rpid: rpid, rpid: rpid,
source: 'routePush', source: 'routePush',
replyType: businessId != null replyType: businessId != null