Skip to content

Fix crash in RefreshVisualizer when not wrapping a ScrollViewer#1328

Merged
jevansaks merged 2 commits intomasterfrom
user/jevansaks/refreshvisualizercrash
Sep 16, 2019
Merged

Fix crash in RefreshVisualizer when not wrapping a ScrollViewer#1328
jevansaks merged 2 commits intomasterfrom
user/jevansaks/refreshvisualizercrash

Conversation

@jevansaks
Copy link
Member

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

@jevansaks jevansaks added release note PR that we want to call out in the next release summary needs-cherrypicktorelease PR tagged for cherry-pick to the current release branch (but not yet picked) labels Sep 13, 2019
@jevansaks jevansaks requested a review from a team as a code owner September 13, 2019 19:48
@jevansaks jevansaks self-assigned this Sep 13, 2019
{
return (1.0f - (float)(refreshInfoProvider.ExecutionRatio())) * PARALLAX_POSITION_RATIO;
}
return 0.0f;
Copy link
Contributor

Choose a reason for hiding this comment

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

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.

@jevansaks jevansaks merged commit 67ab8db into master Sep 16, 2019
@jevansaks jevansaks deleted the user/jevansaks/refreshvisualizercrash branch September 16, 2019 20:03
@jevansaks jevansaks removed the needs-cherrypicktorelease PR tagged for cherry-pick to the current release branch (but not yet picked) label Sep 17, 2019
@msft-github-bot
Copy link
Collaborator

🎉Microsoft.UI.Xaml v2.2.190917002 has been released which incorporates this pull request.:tada:

Handy links:

@msft-github-bot
Copy link
Collaborator

🎉Microsoft.UI.Xaml v2.3.191007001-prerelease has been released which incorporates this pull request.:tada:

Handy links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release note PR that we want to call out in the next release summary

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RefreshVisual Icon is always shown

3 participants