Fix crash in RefreshVisualizer when not wrapping a ScrollViewer#1328
Merged
Fix crash in RefreshVisualizer when not wrapping a ScrollViewer#1328
Conversation
StephenLPeters
suggested changes
Sep 13, 2019
| { | ||
| return (1.0f - (float)(refreshInfoProvider.ExecutionRatio())) * PARALLAX_POSITION_RATIO; | ||
| } | ||
| return 0.0f; |
Contributor
There was a problem hiding this comment.
A default translation ratio of 0.0 is probably wrong. It means that a refresh will be triggered when we have pulled 0% of the visualizers height, I'm not sure what the symptoms of this would be but I think a 1.0 default value (triggers a refresh when 100% of the visualizers length has been pulled) would be safer.
StephenLPeters
approved these changes
Sep 13, 2019
jevansaks
added a commit
that referenced
this pull request
Sep 17, 2019
Collaborator
|
🎉 Handy links: |
Collaborator
|
🎉 Handy links: |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The last change I made here added a test -- that test is crashing because the RefreshVisualizer doesn't actually wrap a ScrollViewer or something that can be "adapted". We shouldn't crash in this case, however. Adding an if check to fix that failing test.
Fixes #1277