Wrap around for previous/next review comment buttons#16319
Merged
Conversation
Fixes go-gitea#16317 Wrap around from last to first comment when clicking "Next" on last comment. Wrap around from first to last comment when clicking "Previous" on first comment.
delvh
approved these changes
Jun 30, 2021
Member
delvh
left a comment
There was a problem hiding this comment.
👍 Also tried implementing it, had almost the exact same solution with the only difference being the ternary operator. The good thing is, now I don't even have to test whether mine is correct.
Codecov Report
@@ Coverage Diff @@
## main #16319 +/- ##
==========================================
- Coverage 45.42% 45.41% -0.01%
==========================================
Files 709 709
Lines 83611 83611
==========================================
- Hits 37978 37970 -8
- Misses 39545 39551 +6
- Partials 6088 6090 +2
Continue to review full report at Codecov.
|
noerw
approved these changes
Jul 1, 2021
zeripath
approved these changes
Jul 1, 2021
zeripath
added a commit
to zeripath/gitea
that referenced
this pull request
Jul 31, 2021
There is a mistake in go-gitea#16319 and go-gitea#16487 which means that the first time a wiki page is created a 500 is reported because the `master` branch is not in existence in that wiki yet. This PR simply checks for this error and returns not found. Fix go-gitea#16584 Signed-off-by: Andrew Thornton <art27@cantab.net>
6543
pushed a commit
that referenced
this pull request
Aug 1, 2021
* Fix 500 on first wiki page There is a mistake in #16319 and #16487 which means that the first time a wiki page is created a 500 is reported because the `master` branch is not in existence in that wiki yet. This PR simply checks for this error and returns not found. Fix #16584 Signed-off-by: Andrew Thornton <art27@cantab.net>
zeripath
added a commit
to zeripath/gitea
that referenced
this pull request
Aug 1, 2021
Backport go-gitea#16586 There is a mistake in go-gitea#16319 and go-gitea#16487 which means that the first time a wiki page is created a 500 is reported because the `master` branch is not in existence in that wiki yet. This PR simply checks for this error and returns not found. Fix go-gitea#16584 Signed-off-by: Andrew Thornton <art27@cantab.net>
zeripath
added a commit
that referenced
this pull request
Aug 3, 2021
Backport #16586 There is a mistake in #16319 and #16487 which means that the first time a wiki page is created a 500 is reported because the `master` branch is not in existence in that wiki yet. This PR simply checks for this error and returns not found. Fix #16584 Signed-off-by: Andrew Thornton <art27@cantab.net>
AbdulrhmnGhanem
pushed a commit
to kitspace/gitea
that referenced
this pull request
Aug 10, 2021
Fixes go-gitea#16317 Wrap around from last to first comment when clicking "Next" on last comment. Wrap around from first to last comment when clicking "Previous" on first comment.
AbdulrhmnGhanem
pushed a commit
to kitspace/gitea
that referenced
this pull request
Aug 10, 2021
* Fix 500 on first wiki page There is a mistake in go-gitea#16319 and go-gitea#16487 which means that the first time a wiki page is created a 500 is reported because the `master` branch is not in existence in that wiki yet. This PR simply checks for this error and returns not found. Fix go-gitea#16584 Signed-off-by: Andrew Thornton <art27@cantab.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #16317
Wrap around from last to first comment when clicking "Next" on last comment.
Wrap around from first to last comment when clicking "Previous" on first comment.