Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-02-11 14:07:43 +08:00
parent 51a12d7266
commit 192f8924c8

View File

@@ -1,5 +1,6 @@
import 'dart:async'; import 'dart:async';
import 'package:PiliPlus/http/dynamics.dart';
import 'package:PiliPlus/models/common/reply_type.dart'; import 'package:PiliPlus/models/common/reply_type.dart';
import 'package:PiliPlus/utils/extension.dart'; import 'package:PiliPlus/utils/extension.dart';
import 'package:app_links/app_links.dart'; import 'package:app_links/app_links.dart';
@@ -122,9 +123,9 @@ class PiliScheme {
List<String> pathParts = path.split('/'); List<String> pathParts = path.split('/');
// int type = int.parse(pathParts[2]); // int type = int.parse(pathParts[2]);
int oid = int.parse(pathParts[3]); int oid = int.parse(pathParts[3]);
// int rootId = int.parse(pathParts[4]); int rootId = int.parse(pathParts[4]);
// int subType = int.parse(value.queryParameters['subType'] ?? '0'); // int subType = int.parse(value.queryParameters['subType'] ?? '0');
int rpID = int.parse(value.queryParameters['anchor'] ?? '0'); // int rpID = int.parse(value.queryParameters['anchor'] ?? '0');
// int extraIntentId = // int extraIntentId =
// int.parse(value.queryParameters['extraIntentId'] ?? '0'); // int.parse(value.queryParameters['extraIntentId'] ?? '0');
Get.to( Get.to(
@@ -147,14 +148,30 @@ class PiliScheme {
), ),
body: VideoReplyReplyPanel( body: VideoReplyReplyPanel(
oid: oid, oid: oid,
rpid: rpID, rpid: rootId, // rpID,
source: 'routePush', source: 'routePush',
replyType: ReplyType.dynamics, replyType: ReplyType.dynamics,
firstFloor: null), firstFloor: null,
),
), ),
); );
} else if (host == 'following' && path.startsWith("/detail/")) { } else if (host == 'following' && path.startsWith("/detail/")) {
void getToOpusWeb() { void getToOpusWeb() async {
String? id = RegExp(r'detail/(\d+)').firstMatch(path)?.group(1);
if (id != null) {
SmartDialog.showLoading();
dynamic res = await DynamicsHttp.dynamicDetail(id: id);
SmartDialog.dismiss();
if (res['status']) {
Get.toNamed('/dynamicDetail', arguments: {
'item': res['data'],
'floor': 1,
'action': 'detail'
});
} else {
SmartDialog.showToast(res['msg']);
}
} else {
var opusId = path.split('/').last; var opusId = path.split('/').last;
Utils.toDupNamed( Utils.toDupNamed(
'/webview', '/webview',
@@ -165,6 +182,7 @@ class PiliScheme {
}, },
); );
} }
}
if (value.queryParameters['comment_root_id'] != null) { if (value.queryParameters['comment_root_id'] != null) {
Get.to( Get.to(