Skip to content

Commit 1f90376

Browse files
GiteaBotHesterG
andauthored
Fix show more for image on diff page (go-gitea#25672) (go-gitea#25673)
Backport go-gitea#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 <hestergong@gmail.com>
1 parent 0af6542 commit 1f90376

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

web_src/js/features/repo-diff.js

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {initRepoIssueContentHistory} from './repo-issue-content.js';
44
import {initDiffFileTree} from './repo-diff-filetree.js';
55
import {validateTextareaNonEmpty} from './comp/ComboMarkdownEditor.js';
66
import {initViewedCheckboxListenerFor, countAndUpdateViewedFiles, initExpandAndCollapseFilesButton} from './pull-view-file.js';
7+
import {initImageDiff} from './imagediff.js';
78

89
const {csrfToken, pageData} = window.config;
910

@@ -117,6 +118,7 @@ function onShowMoreFiles() {
117118
initRepoIssueContentHistory();
118119
initViewedCheckboxListenerFor();
119120
countAndUpdateViewedFiles();
121+
initImageDiff();
120122
}
121123

122124
export function loadMoreFiles(url) {

0 commit comments

Comments
 (0)