-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Remove lock
statements from InAppNotification
control
#3368
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
Remove lock
statements from InAppNotification
control
#3368
Conversation
Thanks vgromfeld for opening a Pull Request! The reviewers will test the PR and highlight if there is any conflict or changes required. If the PR is approved we will proceed to merge the pull request 🙌 |
Sweet. Indeed, Anyway, I am not able to test that for the moment but the code seems OK. |
@vgromfeld seems like there is a conflict being detected. If you can resolve the conflict then it should do the Job 🚀 |
Microsoft.Toolkit.Uwp.UI.Controls/InAppNotification/Styles/MSEdgeNotificationStyle.xaml
Show resolved
Hide resolved
Microsoft.Toolkit.Uwp.UI.Controls/InAppNotification/InAppNotification.cs
Show resolved
Hide resolved
Microsoft.Toolkit.Uwp.SampleApp/SamplePages/InAppNotification/InAppNotificationPage.xaml.cs
Show resolved
Hide resolved
Hello @michael-hawker! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀 🚀 🚀
Fixes
Remove the
lock
statements used inInAppNotification
as well as all the timers used to detect when the animation ends.PR Type
What kind of change does this PR introduce?
What is the current behavior?
The current
InAppNotification
implementation is using a lot oflock
which are not needed since all the code lives in the UI thread.What is the new behavior?
The control is no longer using any
lock
. All the notifications are now pushed to_stackedNotificationOptions
which will control when the notification is displayed. This change allow us to set the appropriate content on theContentPresenter
when the control template is applied.WE can also now push directly an
object
content as the notification payload. To make it always work, I've simplified the logic between theInAppNotification
and its template. This is introducing a breaking change in the notification template.PR Checklist
Please check if your PR fulfills the following requirements:
The
ContentPresenter
of theInAppNotification
template must now be namedPART_Presenter
.Other information
The XAML files have been updated by XAML styler and contains a lot of changes unrelated to this PR.