Skip to content

Commit a1cc628

Browse files
committed
Fix Windows Snackbar Registration
1 parent 6133ad1 commit a1cc628

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
@@ -87,7 +87,7 @@ public void SetShouldEnableSnackbarOnWindows(bool value)
8787
{
8888
throw new InvalidOperationException($"{nameof(Application)}.{nameof(Application.Current)} cannot be null when Windows are closed");
8989
}
90-
else if (Application.Current.Windows.Count is 1)
90+
else if (Application.Current.Windows.Count is 0)
9191
{
9292
Microsoft.Windows.AppNotifications.AppNotificationManager.Default.NotificationInvoked -= OnSnackbarNotificationInvoked;
9393
Microsoft.Windows.AppNotifications.AppNotificationManager.Default.Unregister();

0 commit comments

Comments
 (0)