Skip to content

Fix loading content history on show more #17819

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Dec 6, 2021
4 changes: 3 additions & 1 deletion web_src/js/features/repo-diff.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {initCompReactionSelector} from './comp/ReactionSelector.js';

import {initRepoIssueContentHistory} from './repo-issue-content.js';
const {csrfToken} = window.config;

export function initRepoDiffReviewButton() {
Expand Down Expand Up @@ -101,6 +101,7 @@ export function initRepoDiffShowMore() {
$('#diff-too-many-files-stats').remove();
$('#diff-files').append($(resp).find('#diff-files li'));
$('#diff-incomplete').replaceWith($(resp).find('#diff-file-boxes').children());
initRepoIssueContentHistory();
}).fail(() => {
$('#diff-show-more-files, #diff-show-more-files-stats').removeClass('disabled');
});
Expand All @@ -126,6 +127,7 @@ export function initRepoDiffShowMore() {
}

$target.parent().replaceWith($(resp).find('#diff-file-boxes .diff-file-body .file-body').children());
initRepoIssueContentHistory();
}).fail(() => {
$target.removeClass('disabled');
});
Expand Down