mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-18 06:47:02 +08:00
fix(editor): time issues of comment initialization (#13031)
#### PR Dependency Tree * **PR #13031** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added the ability to filter comments by their resolution status (resolved, unresolved, or all) when viewing or managing comments. * **Refactor** * Improved the way commented text is identified and retrieved, resulting in more reliable comment selection and filtering. * Enhanced comment retrieval to support asynchronous data loading, ensuring up-to-date comment information. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -15,7 +15,10 @@ export interface CommentProvider {
|
||||
addComment: (selections: BaseSelection[]) => void;
|
||||
resolveComment: (id: CommentId) => void;
|
||||
highlightComment: (id: CommentId | null) => void;
|
||||
getComments: () => CommentId[];
|
||||
|
||||
getComments: (
|
||||
type: 'resolved' | 'unresolved' | 'all'
|
||||
) => Promise<CommentId[]> | CommentId[];
|
||||
|
||||
onCommentAdded: (
|
||||
callback: (id: CommentId, selections: BaseSelection[]) => void
|
||||
|
||||
Reference in New Issue
Block a user