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 Windows Media Element in MultiWindow Mode on exit Crash #2259

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ne0rrmatrix
Copy link
Contributor

  • Bug fix

Description of Change

Track window count and manage snackbar notifications

Added a static NumberOfWindows property to the Options class to track the number of windows. Updated SetShouldEnableSnackbarOnWindows to increment/decrement NumberOfWindows on window creation/closure. Conditional registration/unregistration of AppNotificationManager for snackbar notifications based on NumberOfWindows count.

Linked Issues

PR Checklist

  • Has a linked Issue, and the Issue has been approved(bug) or Championed (feature/proposal)
  • Has tests (if omitted, state reason in description)
  • Has samples (if omitted, state reason in description)
  • Rebased on top of main at time of PR
  • Changes adhere to coding standard
  • Documentation created or updated: https://github.com/MicrosoftDocs/CommunityToolkit/pulls

Additional information

This PR uses a simple counter to track the number of windows that exist and only when one is remaining will it unregister Snackview

Added a static `NumberOfWindows` property to the `Options` class to track the number of windows. Updated `SetShouldEnableSnackbarOnWindows` to increment/decrement `NumberOfWindows` on window creation/closure. Conditional registration/unregistration of `AppNotificationManager` for snackbar notifications based on `NumberOfWindows` count.
@ne0rrmatrix ne0rrmatrix self-assigned this Oct 5, 2024
@ne0rrmatrix ne0rrmatrix added the 📽️ MediaElement Issue/PR that has to do with MediaElement label Oct 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📽️ MediaElement Issue/PR that has to do with MediaElement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Media Element Multi-Window Page crash on app exit
1 participant