-
Notifications
You must be signed in to change notification settings - Fork 11
🐛 Improve "scroll to me" #1482
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
🐛 Improve "scroll to me" #1482
Conversation
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.
Pull request overview
This PR improves the reliability of the "scroll to me" functionality on the leaderboard by fixing the scroll logic and ensuring proper thread synchronization. The changes address issues where the scroll operation might fail due to timing problems or incorrect loop logic.
Key Changes:
- Fixed the while loop logic in ScrollToMe to check for limit conditions first and update myCard at the correct position
- Added MainThread invocation with a small delay before scrolling to ensure UI is ready
- Moved ScrollTo event handler subscription earlier in OnAppearing to ensure it's registered before Initialise completes
- Removed unused Microsoft.Maui.Controls.Internals import
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/MobileUI/Features/Leaderboard/LeaderboardViewModel.cs | Refactored ScrollToMe logic to check limit first, update myCard at loop end, and add thread-safe delayed scrolling |
| src/MobileUI/Features/Leaderboard/LeaderboardPage.xaml.cs | Moved ScrollTo event subscription earlier and removed unused import |
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.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
jernejk
left a 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.
✅ LGTM
#1435
Improves reliability of "scroll to me" button
No