feat(player): 点赞与评论改为按集
This commit is contained in:
1 parent
e6f34977f5
commit
83822a0cbb
25 files changed
+337
-69
No files matched your search
@@ -31,9 +31,10 @@ const double _composerTopGap = 8;
|
||||
|
||||
/// 服务端评论底部弹窗:匿名列表、游标翻页、回复与登录发布。
|
||||
class DramaCommentsSheet extends StatefulWidget {
|
||||
const DramaCommentsSheet({super.key, required this.drama});
|
||||
const DramaCommentsSheet({super.key, required this.drama, this.episodeId});
|
||||
|
||||
final Drama drama;
|
||||
final String? episodeId;
|
||||
|
||||
@override
|
||||
State<DramaCommentsSheet> createState() => _DramaCommentsSheetState();
|
||||
@@ -56,6 +57,7 @@ class _DramaCommentsSheetState extends State<DramaCommentsSheet> {
|
||||
comments: _comments,
|
||||
interactions: context.read<InteractionRepository>(),
|
||||
dramaId: widget.drama.id,
|
||||
episodeId: widget.episodeId,
|
||||
);
|
||||
unawaited(_controller.load());
|
||||
unawaited(_refreshCount());
|
||||
@@ -77,7 +79,10 @@ class _DramaCommentsSheetState extends State<DramaCommentsSheet> {
|
||||
Future<void> _refreshCount() async {
|
||||
final request = ++_countRequest;
|
||||
try {
|
||||
final count = await _comments.count(widget.drama.id);
|
||||
final count = await _comments.count(
|
||||
widget.drama.id,
|
||||
episodeId: widget.episodeId,
|
||||
);
|
||||
if (!mounted || request != _countRequest) return;
|
||||
setState(() => _serverCount = count);
|
||||
} catch (_) {
|
||||
@@ -464,8 +469,9 @@ class _CommentThread extends StatelessWidget {
|
||||
Text(
|
||||
expanded
|
||||
? AppLocalizations.of(context)!.hideReplies
|
||||
: AppLocalizations.of(context)!
|
||||
.viewReplies(comment.replyCount),
|
||||
: AppLocalizations.of(
|
||||
context,
|
||||
)!.viewReplies(comment.replyCount),
|
||||
style: const TextStyle(
|
||||
color: AppColors.muted,
|
||||
fontSize: 12,
|
||||
|
||||
Reference in new issue
Block a user