-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrap around for previous/next review comment buttons #16319
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 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.
|
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>
* 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>
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>
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>
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.
* 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>
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.