From 1f90376041436df58aecf1541b8cfff43dba12e0 Mon Sep 17 00:00:00 2001 From: Giteabot Date: Tue, 4 Jul 2023 04:44:45 -0400 Subject: [PATCH] Fix show more for image on diff page (#25672) (#25673) Backport #25672 by @HesterG Right now when clicking on loadmore on files change page, if the loaded content is image, it will be always in load status: https://github.com/go-gitea/gitea/assets/17645053/39e449b6-067a-474c-9443-9dd98d5bbfe2 This PR fixes this by adding `initImageDiff ` to `onShowMoreFiles ` After: https://github.com/go-gitea/gitea/assets/17645053/87bbb13e-0064-4a6e-a7ad-0f0060eb8bff Co-authored-by: HesterG --- web_src/js/features/repo-diff.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/web_src/js/features/repo-diff.js b/web_src/js/features/repo-diff.js index 1d3c24e34280..f4bb724fe514 100644 --- a/web_src/js/features/repo-diff.js +++ b/web_src/js/features/repo-diff.js @@ -4,6 +4,7 @@ import {initRepoIssueContentHistory} from './repo-issue-content.js'; import {initDiffFileTree} from './repo-diff-filetree.js'; import {validateTextareaNonEmpty} from './comp/ComboMarkdownEditor.js'; import {initViewedCheckboxListenerFor, countAndUpdateViewedFiles, initExpandAndCollapseFilesButton} from './pull-view-file.js'; +import {initImageDiff} from './imagediff.js'; const {csrfToken, pageData} = window.config; @@ -117,6 +118,7 @@ function onShowMoreFiles() { initRepoIssueContentHistory(); initViewedCheckboxListenerFor(); countAndUpdateViewedFiles(); + initImageDiff(); } export function loadMoreFiles(url) {