Skip to content

Commit

Permalink
Fix loading content history on show more (#17819)
Browse files Browse the repository at this point in the history
* Fix loading content history on show more

- Call `initRepoIssueContentHistory` so that the newly loaded issues
also get their content history.
- Resolves #17767

* apply history to show diff too

Signed-off-by: Andrew Thornton <[email protected]>

Co-authored-by: Lunny Xiao <[email protected]>
Co-authored-by: zeripath <[email protected]>
Co-authored-by: 6543 <[email protected]>
  • Loading branch information
4 people authored Dec 6, 2021
1 parent 6255ff8 commit 9d62089
Showing 1 changed file with 3 additions and 1 deletion.
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

0 comments on commit 9d62089

Please sign in to comment.