Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 4905769

Browse files
authored
Merge pull request #2167 from github/fixes/2166-cant-comment-on-deleted-line
Fix AvailableForComment calculation.
2 parents 96884ce + f30604e commit 4905769

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/GitHub.InlineReviews/ViewModels/InlineCommentPeekViewModel.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,9 @@ async Task UpdateThread()
196196

197197
AvailableForComment =
198198
file.Diff.Any(chunk => chunk.Lines
199-
.Any(line => line.NewLineNumber - 1 == lineNumber));
199+
.Any(line => leftBuffer ?
200+
line.OldLineNumber - 1 == lineNumber :
201+
line.NewLineNumber - 1 == lineNumber));
200202

201203
var thread = file.InlineCommentThreads?.FirstOrDefault(x =>
202204
x.LineNumber == lineNumber &&

0 commit comments

Comments
 (0)