Skip to content
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

Fix issue with TabView crashing in a NavigationCacheMode=Required page #1482

Merged
merged 7 commits into from
Oct 30, 2019
Merged

Conversation

mdmozibur
Copy link
Contributor

Description

When the TabView is in a Page which has NavigationCacheMode = "Required", it'd cause the app to crash. Because, in the Loaded event of the ListView, the previous code would always add the current TabItems of the TabView, but it is necessary to check whether the Items being added have already been added before. As it didn't check that, it would crash in the second loaded event.

Fixes #1245

How Has This Been Tested?

I used the MUXControlTestApp to test the changes. I set the NavigationCacheMode="Required" of the TabViewPage and navigated back and forth to ensure it doesn't crash anymore, as it would before.

@mdmozibur mdmozibur requested a review from a team as a code owner October 23, 2019 11:16
@msftclas
Copy link

msftclas commented Oct 23, 2019

CLA assistant check
All CLA requirements met.

dev/TabView/TabView.cpp Outdated Show resolved Hide resolved
dev/TabView/TabView.cpp Outdated Show resolved Hide resolved
dev/TabView/TabView.cpp Outdated Show resolved Hide resolved
@StephenLPeters
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 1482 in repo microsoft/microsoft-ui-xaml

@StephenLPeters
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@StephenLPeters
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@StephenLPeters
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jevansaks jevansaks changed the title fixes #1245 Fix issue with TabView crashing in a NavigationCacheMode=Required page Oct 29, 2019
@jevansaks
Copy link
Member

Nit: I edited the title of this PR to be more descriptive.

Copy link
Contributor

@StephenLPeters StephenLPeters left a comment

Choose a reason for hiding this comment

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

:shipit:

@StephenLPeters StephenLPeters merged commit 6bc3854 into microsoft:master Oct 30, 2019
@jevansaks jevansaks added the release note PR that we want to call out in the next release summary label Nov 8, 2019
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.

TabView crashed on second Loaded event
5 participants