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

Android Dialogs: Fix close & do not keep references to instances #2711

Merged
merged 3 commits into from
Mar 21, 2018

Conversation

nmilcoff
Copy link
Contributor

✨ What kind of change does this PR introduce? (Bug fix, feature, docs update...)

Bug fix

⤵️ What is the current behavior?

  1. When the screen is rotated, dialogs are recreated and instances held in our ViewPresenter are obsolete. Therefore when trying to close a dialog after a rotation -> 💣 💥
  2. Json plugin has a useless definition of Preserve attribute

🆕 What is the new behavior (if this is a feature change)?

  1. Above is fixed. We obtain the Dialog to close from the fragment manager.
  2. That preserve attribute is removed.

💥 Does this PR introduce a breaking change?

No.

🐛 Recommendations for testing

  1. Run Playground.Droid
  2. Tap on "Show modal"
  3. Rotate the screen
  4. Close the dialog

On current develop this will fail, on this branch it won't.

📝 Links to relevant issues/docs

Fixes #2378

🤔 Checklist before submitting

@nmilcoff nmilcoff added t/bug Bug type p/android Android platform p/android-support Android Support Packages platform labels Mar 21, 2018
@nmilcoff nmilcoff added this to the 6.0.0 milestone Mar 21, 2018
@martijn00 martijn00 merged commit d3d25bf into MvvmCross:develop Mar 21, 2018
@nmilcoff nmilcoff deleted the dialogs branch March 21, 2018 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p/android Android platform p/android-support Android Support Packages platform t/bug Bug type
Development

Successfully merging this pull request may close these issues.

MvxAppCompatDialogFragment Attempt to invoke virtual method on a null object reference
2 participants