Skip to content

Conversation

albertodlc
Copy link
Contributor

Error
When a commit was selected (single click without checkout) and the user double tapped in an empty part of the histories ListBox
image

The Checkout message was displayed for the last selected commit.
image

Fix
It shouldn't execute that action unless the user double tap on a commit. I validated the name of the pressed UI element and ignore the empty part of the checkbox.

-  Refactor 'if-else' snippet to 'ifs' with early returns
- When a commit was selected and you double tapped an empty section of the histories ListBox, the last selected commit was checkout.
- Using the 'TappedEventArgs' properties, and validating the name of the tapped section (PART_ContentPresenter) we can avoid this.
@albertodlc albertodlc changed the title [Fix] Commit histories double click error fix: commit histories double click error Nov 14, 2024
@albertodlc albertodlc marked this pull request as ready for review November 14, 2024 18:31
@love-linger
Copy link
Collaborator

I've pushed my implementation for this issue. See commit 4835c3f

@albertodlc albertodlc deleted the fix-commit-histories-double-click branch November 15, 2024 09:23
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.

2 participants