-
Notifications
You must be signed in to change notification settings - Fork 380
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
Use AppNotificationManager instead of ToastNotificationManager #900
Conversation
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.
Couple of very minor things! The actual code looks good to me!
Co-authored-by: Gerald Versluis <gerald@verslu.is>
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.
I've just a few comments. And should be good to go.
…it/Maui into Toast-Use-New-API
string text = string.Empty; | ||
string actionButtonText = AlertDefaults.ActionButtonText; | ||
readonly string text = string.Empty; | ||
readonly string actionButtonText = AlertDefaults.ActionButtonText; |
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.
Cool!! I didn't know that we could use readonly
fields in get; init;
properties!
I like it. It makes a lot of sense 💯
/// </summary> | ||
/// <param name="text">Notification text</param> | ||
/// <returns><see cref="XmlDocument"/></returns> | ||
public static XmlDocument BuildToastNotificationContent(string text) |
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.
FYI - this is technically a breaking change, removing a public API
We'll need to bump our Major version number for our next release (which'll hopefully coincide with the release of MediaPlayer
)
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.
That being said, I'd be surprised if removing this API impacts any devs
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.
How start coding
Description of Change
Update Toast Windows to use the new API AppNotificationManager as Microsoft recommends: https://learn.microsoft.com/en-us/windows/apps/design/shell/tiles-and-notifications/adaptive-interactive-toasts?tabs=appsdk
PR Checklist
approved
(bug) orChampioned
(feature/proposal)main
at time of PRAdditional information