private void UpdateVisibleComments() { var revisionRepository = new RevisionRepository(); var currentRevisionNumber = ChangeInfo.Revisions[ChangeInfo.CurrentRevision].Number.ToString(); var comments = revisionRepository.GetComments(ChangeInfo.ChangeId, currentRevisionNumber); var result = new ChangeComments(); comments.Select(file => new FileWithComments(file.Key, file.Value.Select(comment => new FileComment(comment.Range.StartLine, $"{comment.Message} ({comment.Author.Username})")))) .ToList() .ForEach(result.AddFile); ChangeCommentService.Instance.UpdateChangeComments(result); }
public void UpdateChangeComments(ChangeComments changeComments) { _changeComments = changeComments; }