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: Fixed issue where opening and closing modals quickly may lead to a crash #11928

Merged

Conversation

ferrariofilippo
Copy link
Contributor

Resolved / Related Issues

  • Were these changes approved in an issue or discussion with the project maintainers? In order to prevent extra work, feature requests and changes to the codebase must be approved before the pull request will be reviewed. This prevents extra work for the contributors and maintainers.
    Closes Bug: Opening and closing modals quickly may lead to a crash #11804

Details

  • I couldn't use the solution proposed in the related issue (creating a wrapper) since some dialogs may be at random times (paste) and that would lock most of the actions
  • Now in UIHelpers there's a bool that is set to true when the app is ready to show a new dialog
  • BaseUIAction is used to reduce code duplication (UIHelpers.PropertyChanged)
  • I removed DialogExtension.cs since it was used only once and there was a method that did the same thing
  • I removed all but one SetContentDialogRoot() since they share the same code. (Note this method is invoked by TryShowAsync() so everything works same as before)

Others

  • Do we really need DialogResult? It has the same values as the predefined enum ContentDialogResult

Validation
How did you test these changes?

  • Did you build the app and test your changes?
  • Did you check for accessibility? You can use Accessibility Insights for this.
  • Did you remove any strings from the en-us resource file?
    • Did you search the solution to see if the string is still being used?
  • Did you implement any design changes to an existing feature?
    • Was this change approved?
  • Are there any other steps that were used to validate these changes?
    1. Open app and select a file
    2. quickly click Del and Esc

@yaira2 yaira2 changed the title Fixed: Opening and closing modals quickly may lead to a crash Fix: Fixed issue where oand closing modals quickly may lead to a crash Mar 31, 2023
@yaira2 yaira2 changed the title Fix: Fixed issue where oand closing modals quickly may lead to a crash Fix: Fixed issue where opening and closing modals quickly may lead to a crash Mar 31, 2023
@yaira2 yaira2 requested a review from d2dyno1 April 2, 2023 15:22
@yaira2 yaira2 requested a review from d2dyno1 April 4, 2023 19:08
@yaira2 yaira2 merged commit c0e8a7b into files-community:main Apr 9, 2023
1 check passed
@ferrariofilippo ferrariofilippo deleted the Ensure_Dialog_Is_Closed branch April 9, 2023 06:20
hishitetsu added a commit to hishitetsu/Files that referenced this pull request Apr 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Opening and closing modals quickly may lead to a crash
3 participants