opt: dynamic comment push
This commit is contained in:
@ -3,6 +3,7 @@ import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:pilipala/http/search.dart';
|
||||
import 'package:pilipala/models/common/reply_type.dart';
|
||||
import 'package:pilipala/models/msg/reply.dart';
|
||||
import 'package:pilipala/pages/video/detail/reply_reply/index.dart';
|
||||
import 'package:pilipala/utils/app_scheme.dart';
|
||||
import 'package:pilipala/utils/utils.dart';
|
||||
@ -10,7 +11,12 @@ import 'package:pilipala/utils/utils.dart';
|
||||
class MessageUtils {
|
||||
// 回复我的、收到的赞点击
|
||||
static void onClickMessage(
|
||||
BuildContext context, Uri uri, Uri nativeUri, String type) async {
|
||||
BuildContext context,
|
||||
Uri uri,
|
||||
Uri nativeUri,
|
||||
String type,
|
||||
ReplyContentItem? item,
|
||||
) async {
|
||||
final String path = uri.path;
|
||||
final String bvid = path.split('/').last;
|
||||
String? sourceType;
|
||||
@ -24,8 +30,8 @@ class MessageUtils {
|
||||
if (nativePath.contains('detail')) {
|
||||
// 动态详情
|
||||
sourceType = 'opus';
|
||||
oid = nativePath.split('/')[3];
|
||||
commentRootId = nativePath.split('/')[4];
|
||||
oid = item?.subjectId!.toString() ?? nativePath.split('/')[3];
|
||||
commentRootId = item?.sourceId!.toString() ?? nativePath.split('/')[4];
|
||||
}
|
||||
switch (type) {
|
||||
case 'video':
|
||||
@ -47,6 +53,7 @@ class MessageUtils {
|
||||
}
|
||||
break;
|
||||
case 'reply':
|
||||
case 'dynamic':
|
||||
debugPrint('commentRootId: $oid, $commentRootId');
|
||||
navigateToComment(
|
||||
context,
|
||||
|
||||
Reference in New Issue
Block a user