Skip to content

Conversation

@zacharykeeping
Copy link
Member

  1. What triggered this change? (PBI link, Email Subject, conversation + reason, etc)

#1435

  1. What was changed?

Improves reliability of "scroll to me" button

  1. Did you do pair or mob programming?

No

Copy link
Contributor

Copilot AI left a 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

Copy link
Contributor

Copilot AI left a 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.

Copy link
Member

@jernejk jernejk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM

@zacharykeeping zacharykeeping merged commit da5ad81 into main Jan 7, 2026
12 checks passed
@zacharykeeping zacharykeeping deleted the improve-scroll-to-me branch January 7, 2026 00:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants