Badge
Badge copied to clipboard
[UWP] The notification has already been posted.
When I run this code in a UWP project I get an exception. Please advise.
Device.BeginInvokeOnMainThread( () => {
try {
if( number == 0 )
CrossBadge.Current.ClearBadge();
else
CrossBadge.Current.SetBadge( number );
} catch( Exception ex ) {
ex.ToString();
}
} );
{System.Runtime.InteropServices.COMException (0x803E0106): The notification has already been posted.
at Windows.UI.Notifications.BadgeUpdater.Update(BadgeNotification notification)
at Plugin.Badge.BadgeImplementation.SetBadge(Int32 badgeNumber)
at Shortbench.Views.DrawerMenu.<>c__DisplayClass8_0.<CheckForUnreadNotifications>b__3()}
Could be because of the duplicate line: https://github.com/alexrainman/Badge/blob/e11e1819c5b433d6a3ed06722219f0565a1a0470/Badge/Plugin.Badge.UWP/BadgeImplementation.cs#L34