fix(player): 评论总数含回复并改用相对时间
This commit is contained in:
1 parent
22cb74ded4
commit
2659c29501
14 files changed
+212
-9
No files matched your search
@@ -42,7 +42,7 @@ class FakeCommentRepository implements CommentRepository {
|
||||
this.publishError,
|
||||
this.deleteError,
|
||||
this.pageError,
|
||||
this.countResult = 0,
|
||||
this.countResult,
|
||||
this.countError,
|
||||
}) : pages = pages ?? const [];
|
||||
|
||||
@@ -51,7 +51,7 @@ class FakeCommentRepository implements CommentRepository {
|
||||
final Object? publishError;
|
||||
final Object? deleteError;
|
||||
final Object? pageError;
|
||||
final int countResult;
|
||||
final int? countResult;
|
||||
final Object? countError;
|
||||
final List<CommentPageCall> pageCalls = [];
|
||||
final List<PublishCall> publishCalls = [];
|
||||
@@ -85,7 +85,9 @@ class FakeCommentRepository implements CommentRepository {
|
||||
countCalls.add(dramaId);
|
||||
final error = countError;
|
||||
if (error != null) throw error;
|
||||
return countResult;
|
||||
final result = countResult;
|
||||
if (result == null) throw StateError('comment count unavailable');
|
||||
return result;
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
Reference in new issue
Block a user