diff options
author | sillyguodong <33891828+sillyguodong@users.noreply.github.com> | 2023-04-12 21:11:23 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-12 15:11:23 +0200 |
commit | 3753ecd58348a8b693a1c707b471d0fb0c7566f2 (patch) | |
tree | 5cbf6dd0c77ee6c201616789bafaca248d4cadcb /web_src | |
parent | 58b36cc42291e274dbc80d2d617e63119c64542c (diff) | |
download | gitea-3753ecd58348a8b693a1c707b471d0fb0c7566f2.tar.gz gitea-3753ecd58348a8b693a1c707b471d0fb0c7566f2.zip |
Update the value of the `diffEnd` when click `Show More` btn in the DiffFileTree (#24069)
In the component `DiffFileTree`,if don't update the value of the
`diffEnd` in the callback of ajax request, click `Show More` btn will
always return the same response, duplicate files are appended to the
file list.
Before:
https://user-images.githubusercontent.com/33891828/231371188-82d169af-10bb-47e2-8aca-83ced2597f2d.mov
After:
https://user-images.githubusercontent.com/33891828/231369805-39a5a4d0-662c-4f08-bc5a-7d31e8782453.mov
---------
Co-authored-by: Giteabot <teabot@gitea.io>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'web_src')
-rw-r--r-- | web_src/js/components/DiffFileTree.vue | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/web_src/js/components/DiffFileTree.vue b/web_src/js/components/DiffFileTree.vue index c5a62dd4cc..6ac16def99 100644 --- a/web_src/js/components/DiffFileTree.vue +++ b/web_src/js/components/DiffFileTree.vue @@ -145,6 +145,8 @@ export default { this.isLoadingNewData = true; doLoadMoreFiles(this.link, this.diffEnd, () => { this.isLoadingNewData = false; + const {pageData} = window.config; + this.diffEnd = pageData.diffFileInfo.diffEnd; }); }, }, |