mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-21 03:56:23 +08:00
fix(core): should be able to unresolve a resolved comment (#13078)
#### PR Dependency Tree * **PR #13078** 👈 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** * The resolve comment button is now always visible to users with permission to resolve comments, regardless of the comment's current status. * **Refactor** * Adjusted internal comment resolution logic to streamline how missing comments are handled between the provider and the editor. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -74,12 +74,6 @@ export class InlineCommentManager extends LifeCycleWatcher {
|
||||
...new Set([...inlineComments, ...blockComments]),
|
||||
];
|
||||
|
||||
// resolve comments that are in provider but not in editor
|
||||
// which means the commented content may be deleted
|
||||
difference(commentsInProvider, commentsInEditor).forEach(comment => {
|
||||
provider.resolveComment(comment);
|
||||
});
|
||||
|
||||
// remove comments that are in editor but not in provider
|
||||
// which means the comment may be removed or resolved in provider side
|
||||
difference(commentsInEditor, commentsInProvider).forEach(comment => {
|
||||
|
||||
@@ -362,7 +362,7 @@ const CommentItem = ({
|
||||
data-menu-open={menuOpen}
|
||||
data-editing={isEditing}
|
||||
>
|
||||
{!comment.resolved && canResolveComment && (
|
||||
{canResolveComment && (
|
||||
<IconButton
|
||||
variant="solid"
|
||||
onClick={handleResolve}
|
||||
|
||||
Reference in New Issue
Block a user