summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilutin Kristofic <milutin@google.com>2024-04-09 09:49:34 +0200
committerPaladox none <thomasmulhall410@yahoo.com>2024-04-16 14:27:15 +0000
commitaefba749d116c87cbe544563317517528cc12f3c (patch)
treebb14108a906ae693460a501ee5185032d39d7794
parent605f985e3dcdb332408ccb41a5dd850b6208f734 (diff)
Enable applying fixes for drafts
To be consistent with design. Google-Bug-Id: b/326195247 Release-Notes: skip Change-Id: I19ff2d754301ce385165239ea85983301f06a42d (cherry picked from commit a834715096157c5ea9aa5b1fdd97571956253cd3)
-rw-r--r--polygerrit-ui/app/elements/shared/gr-fix-suggestions/gr-fix-suggestions.ts3
-rw-r--r--polygerrit-ui/app/elements/shared/gr-user-suggestion-fix/gr-user-suggestion-fix.ts3
2 files changed, 2 insertions, 4 deletions
diff --git a/polygerrit-ui/app/elements/shared/gr-fix-suggestions/gr-fix-suggestions.ts b/polygerrit-ui/app/elements/shared/gr-fix-suggestions/gr-fix-suggestions.ts
index 09a71c3f79..7cb1d0091e 100644
--- a/polygerrit-ui/app/elements/shared/gr-fix-suggestions/gr-fix-suggestions.ts
+++ b/polygerrit-ui/app/elements/shared/gr-fix-suggestions/gr-fix-suggestions.ts
@@ -16,7 +16,7 @@ import {resolve} from '../../../models/dependency';
import {configModelToken} from '../../../models/config/config-model';
import {GrSuggestionDiffPreview} from '../gr-suggestion-diff-preview/gr-suggestion-diff-preview';
import {changeModelToken} from '../../../models/change/change-model';
-import {Comment, isDraft, PatchSetNumber} from '../../../types/common';
+import {Comment, PatchSetNumber} from '../../../types/common';
import {OpenFixPreviewEventDetail} from '../../../types/events';
import {pluginLoaderToken} from '../gr-js-api-interface/gr-plugin-loader';
import {SuggestionsProvider} from '../../../api/suggestions';
@@ -187,7 +187,6 @@ export class GrFixSuggestions extends LitElement {
private isApplyEditDisabled() {
if (this.comment?.patch_set === undefined) return true;
- if (isDraft(this.comment)) return true;
return this.comment.patch_set !== this.latestPatchNum;
}
diff --git a/polygerrit-ui/app/elements/shared/gr-user-suggestion-fix/gr-user-suggestion-fix.ts b/polygerrit-ui/app/elements/shared/gr-user-suggestion-fix/gr-user-suggestion-fix.ts
index c8de209163..6d83f4ed17 100644
--- a/polygerrit-ui/app/elements/shared/gr-user-suggestion-fix/gr-user-suggestion-fix.ts
+++ b/polygerrit-ui/app/elements/shared/gr-user-suggestion-fix/gr-user-suggestion-fix.ts
@@ -16,7 +16,7 @@ import {resolve} from '../../../models/dependency';
import {configModelToken} from '../../../models/config/config-model';
import {GrSuggestionDiffPreview} from '../gr-suggestion-diff-preview/gr-suggestion-diff-preview';
import {changeModelToken} from '../../../models/change/change-model';
-import {Comment, isDraft, PatchSetNumber} from '../../../types/common';
+import {Comment, PatchSetNumber} from '../../../types/common';
import {commentModelToken} from '../gr-comment-model/gr-comment-model';
declare global {
@@ -153,7 +153,6 @@ export class GrUserSuggestionsFix extends LitElement {
private isApplyEditDisabled() {
if (this.comment?.patch_set === undefined) return true;
- if (isDraft(this.comment)) return true;
return this.comment.patch_set !== this.latestPatchNum;
}