diff --git a/lib/pages/msg_feed_top/reply_me/view.dart b/lib/pages/msg_feed_top/reply_me/view.dart index c20d92f04..31c835222 100644 --- a/lib/pages/msg_feed_top/reply_me/view.dart +++ b/lib/pages/msg_feed_top/reply_me/view.dart @@ -55,6 +55,7 @@ class _ReplyMePageState extends State { PiliScheme.routePushFromUrl( nativeUri, businessId: item.item?.businessId, + oid: item.item?.subjectId, ); } }, diff --git a/lib/utils/app_scheme.dart b/lib/utils/app_scheme.dart index 11ae2c76a..6047dfe13 100644 --- a/lib/utils/app_scheme.dart +++ b/lib/utils/app_scheme.dart @@ -36,6 +36,7 @@ class PiliScheme { bool off = false, Map? parameters, int? businessId, + int? oid, }) async { try { if (url.startsWith('//')) { @@ -49,6 +50,7 @@ class PiliScheme { off: off, parameters: parameters, businessId: businessId, + oid: oid, ); } catch (_) { return false; @@ -62,6 +64,7 @@ class PiliScheme { bool off = false, Map? parameters, int? businessId, + int? oid, }) async { final String scheme = uri.scheme; final String host = uri.host.toLowerCase(); @@ -323,13 +326,14 @@ class PiliScheme { // businessId == 17 => dynId == oid // bilibili://following/detail/832703053858603029 (dynId) // 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 commentRootId = queryParameters['comment_root_id']; if (commentRootId != null) { - String? oid = uriDigitRegExp.firstMatch(path)?.group(1); + String? dynId = uriDigitRegExp.firstMatch(path)?.group(1); int? rpid = int.tryParse(commentRootId); - if (oid != null && rpid != null) { + if (dynId != null && rpid != null) { Get.to( () => Scaffold( resizeToAvoidBottomInset: false, @@ -346,7 +350,7 @@ class PiliScheme { ], ), body: VideoReplyReplyPanel( - oid: int.parse(oid), + oid: oid ?? int.parse(dynId), rpid: rpid, source: 'routePush', replyType: businessId != null