Maui icon indicating copy to clipboard operation
Maui copied to clipboard

Fix Windows Media Element in MultiWindow Mode on exit Crash

Open ne0rrmatrix opened this issue 4 months ago • 0 comments

  • 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

  • Fixes #2257
  • Fixes #2279

PR Checklist

  • [x] Has a linked Issue, and the Issue has been approved(bug) or Championed (feature/proposal)
  • [ ] Has tests (if omitted, state reason in description)
  • [x] Has samples (if omitted, state reason in description)
  • [x] Rebased on top of main at time of PR
  • [x] 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

ne0rrmatrix avatar Oct 05 '24 15:10 ne0rrmatrix