mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-06-01 08:38:18 +08:00
opt handle reply note
Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
@@ -246,7 +246,7 @@ class _VideoReplyPanelState extends State<VideoReplyPanel>
|
|||||||
id: id,
|
id: id,
|
||||||
oid: oid,
|
oid: oid,
|
||||||
rpid: rpid,
|
rpid: rpid,
|
||||||
firstFloor: replyItem,
|
firstFloor: replyItem.replyControl.isNote ? null : replyItem,
|
||||||
replyType: _videoReplyController.videoType.replyType,
|
replyType: _videoReplyController.videoType.replyType,
|
||||||
isVideoDetail: true,
|
isVideoDetail: true,
|
||||||
isNested: widget.isNested,
|
isNested: widget.isNested,
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ import 'package:PiliPlus/pages/save_panel/view.dart';
|
|||||||
import 'package:PiliPlus/pages/video/controller.dart';
|
import 'package:PiliPlus/pages/video/controller.dart';
|
||||||
import 'package:PiliPlus/pages/video/reply/widgets/zan_grpc.dart';
|
import 'package:PiliPlus/pages/video/reply/widgets/zan_grpc.dart';
|
||||||
import 'package:PiliPlus/utils/accounts.dart';
|
import 'package:PiliPlus/utils/accounts.dart';
|
||||||
|
import 'package:PiliPlus/utils/app_scheme.dart';
|
||||||
import 'package:PiliPlus/utils/date_utils.dart';
|
import 'package:PiliPlus/utils/date_utils.dart';
|
||||||
import 'package:PiliPlus/utils/duration_utils.dart';
|
import 'package:PiliPlus/utils/duration_utils.dart';
|
||||||
import 'package:PiliPlus/utils/extension/context_ext.dart';
|
import 'package:PiliPlus/utils/extension/context_ext.dart';
|
||||||
@@ -797,23 +798,33 @@ class ReplyItemGrpc extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!hasNote &&
|
if (!hasNote &&
|
||||||
(content.richText.hasNote() ||
|
replyItem.replyControl.isNote &&
|
||||||
replyItem.replyControl.bizScene == 'note')) {
|
replyItem.replyControl.isNoteV2) {
|
||||||
|
final Color color;
|
||||||
|
NoDeadlineTapGestureRecognizer? recognizer;
|
||||||
|
|
||||||
final hasClickUrl = content.richText.note.hasClickUrl();
|
final hasClickUrl = content.richText.note.hasClickUrl();
|
||||||
|
if (hasClickUrl || content.richText.opus.hasOpusId()) {
|
||||||
|
color = theme.colorScheme.primary;
|
||||||
|
recognizer = NoDeadlineTapGestureRecognizer()
|
||||||
|
..onTap = () => hasClickUrl
|
||||||
|
? PiliScheme.routePushFromUrl(content.richText.note.clickUrl)
|
||||||
|
: Get.toNamed(
|
||||||
|
'/articlePage',
|
||||||
|
parameters: {
|
||||||
|
'id': content.richText.opus.opusId.toString(),
|
||||||
|
'type': 'opus',
|
||||||
|
},
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
color = theme.colorScheme.secondary;
|
||||||
|
}
|
||||||
spanChildren.insert(
|
spanChildren.insert(
|
||||||
0,
|
0,
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: '[笔记] ',
|
text: '[笔记] ',
|
||||||
style: TextStyle(
|
style: TextStyle(color: color),
|
||||||
color: hasClickUrl
|
recognizer: recognizer,
|
||||||
? theme.colorScheme.primary
|
|
||||||
: theme.colorScheme.secondary,
|
|
||||||
),
|
|
||||||
recognizer: hasClickUrl
|
|
||||||
? (NoDeadlineTapGestureRecognizer()
|
|
||||||
..onTap = () =>
|
|
||||||
PageUtils.handleWebview(content.richText.note.clickUrl))
|
|
||||||
: null,
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user