Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions src/dotnet/APIView/APIViewWeb/Pages/Assemblies/Review.cshtml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,23 +91,6 @@ public async Task<IActionResult> OnGetAsync(string id, string revisionId = null)
showDocumentation: (ShowDocumentation ?? false), showDiffOnly: ShowDiffOnly, diffContextSize: REVIEW_DIFF_CONTEXT_SIZE,
diffContextSeperator: DIFF_CONTEXT_SEPERATOR);

if (!String.IsNullOrEmpty(ReviewContent.ActiveAPIRevision.Files.First().CrossLanguagePackageId))
{
var correspondingReviewId = await _apiRevisionsManager.GetReviewIdsOfLanguageCorrespondingReviewAsync(ReviewContent.ActiveAPIRevision.Files.First().CrossLanguagePackageId);
var correspondingReviews = await _reviewManager.GetReviewsAsync(reviewIds: correspondingReviewId.Where(_ => _ != id).ToList(), isClosed: false);
foreach (var review in correspondingReviews)
{
var reviewContent = await PageModelHelpers.GetReviewContentAsync(configuration: _configuration,
reviewManager: _reviewManager, preferenceCache: _preferenceCache, userProfileRepository: _userProfileRepository,
reviewRevisionsManager: _apiRevisionsManager, commentManager: _commentsManager, codeFileRepository: _codeFileRepository,
signalRHubContext: _signalRHubContext, user: User, review: review, revisionId: null, diffRevisionId: null,
showDocumentation: (ShowDocumentation ?? false), showDiffOnly: ShowDiffOnly, diffContextSize: REVIEW_DIFF_CONTEXT_SIZE,
diffContextSeperator: DIFF_CONTEXT_SEPERATOR);

ReviewContent.CrossLanguageViewContent.Add(review.Language, reviewContent);
}
}

if (ReviewContent.Directive == ReviewContentModelDirective.TryGetlegacyReview)
{
// Check if you can get review from legacy data
Expand Down Expand Up @@ -153,6 +136,23 @@ public async Task<IActionResult> OnGetAsync(string id, string revisionId = null)
return RedirectToPage("LegacyReview", new { id = id });
}

if (!String.IsNullOrEmpty(ReviewContent.ActiveAPIRevision.Files.First().CrossLanguagePackageId))
{
var correspondingReviewId = await _apiRevisionsManager.GetReviewIdsOfLanguageCorrespondingReviewAsync(ReviewContent.ActiveAPIRevision.Files.First().CrossLanguagePackageId);
var correspondingReviews = await _reviewManager.GetReviewsAsync(reviewIds: correspondingReviewId.Where(_ => _ != id).ToList(), isClosed: false);
foreach (var review in correspondingReviews)
{
var reviewContent = await PageModelHelpers.GetReviewContentAsync(configuration: _configuration,
reviewManager: _reviewManager, preferenceCache: _preferenceCache, userProfileRepository: _userProfileRepository,
reviewRevisionsManager: _apiRevisionsManager, commentManager: _commentsManager, codeFileRepository: _codeFileRepository,
signalRHubContext: _signalRHubContext, user: User, review: review, revisionId: null, diffRevisionId: null,
showDocumentation: (ShowDocumentation ?? false), showDiffOnly: ShowDiffOnly, diffContextSize: REVIEW_DIFF_CONTEXT_SIZE,
diffContextSeperator: DIFF_CONTEXT_SEPERATOR);

ReviewContent.CrossLanguageViewContent.Add(review.Language, reviewContent);
}
}

return Page();
}

Expand Down