Skip to content

Commit 195458f

Browse files
authored
Fix Windows Snackbar Registration (#2755)
1 parent 064ac34 commit 195458f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/CommunityToolkit.Maui/Options.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public void SetShouldEnableSnackbarOnWindows(bool value)
9696
{
9797
throw new InvalidOperationException($"{nameof(Application)}.{nameof(Application.Current)} cannot be null when Windows are closed");
9898
}
99-
else if (Application.Current.Windows.Count is 1)
99+
else if (Application.Current.Windows.Count is 0)
100100
{
101101
Microsoft.Windows.AppNotifications.AppNotificationManager.Default.NotificationInvoked -= OnSnackbarNotificationInvoked;
102102
Microsoft.Windows.AppNotifications.AppNotificationManager.Default.Unregister();

0 commit comments

Comments
 (0)