From 9d6208965c0590e307b8b198557690257da83351 Mon Sep 17 00:00:00 2001 From: Gusted Date: Mon, 6 Dec 2021 04:57:51 +0100 Subject: [PATCH] Fix loading content history on show more (#17819) * 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 Co-authored-by: Lunny Xiao Co-authored-by: zeripath Co-authored-by: 6543 <6543@obermui.de> --- web_src/js/features/repo-diff.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web_src/js/features/repo-diff.js b/web_src/js/features/repo-diff.js index 6741f277fb..f8f6c38b76 100644 --- a/web_src/js/features/repo-diff.js +++ b/web_src/js/features/repo-diff.js @@ -1,5 +1,5 @@ import {initCompReactionSelector} from './comp/ReactionSelector.js'; - +import {initRepoIssueContentHistory} from './repo-issue-content.js'; const {csrfToken} = window.config; export function initRepoDiffReviewButton() { @@ -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'); }); @@ -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'); });