misc: fix a build warning.
This commit is contained in:
parent
2d11584282
commit
f86ad05a01
@ -12,7 +12,7 @@ namespace Semi.Avalonia.Demo.Pages;
|
||||
|
||||
public partial class NotificationDemo : UserControl
|
||||
{
|
||||
private WindowNotificationManager _manager;
|
||||
private WindowNotificationManager? _manager;
|
||||
public NotificationDemo()
|
||||
{
|
||||
InitializeComponent();
|
||||
@ -29,7 +29,7 @@ public partial class NotificationDemo : UserControl
|
||||
{
|
||||
if (sender is Button b && b.Content is string s && Enum.TryParse<NotificationType>(s, out NotificationType t))
|
||||
{
|
||||
_manager.Show(new Notification(t.ToString(), "This is message", t));
|
||||
_manager?.Show(new Notification(t.ToString(), "This is message", t));
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user