You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There was an issue raised back in April for this, but I'm still seeing the issue in version 3.2.0. When clicking on a notification, I occasionally get the error below:
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.ThrowHelper.ThrowKeyNotFoundException () [0x00000] in <3fd174ff54b146228c505f23cf75ce71>:0
at System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) [0x0001e] in <3fd174ff54b146228c505f23cf75ce71>:0
at Plugin.Toasts.SnackbarNotification.ToastClosed (System.String id, Plugin.Toasts.NotificationResult result) [0x0001e] in C:\Users\Adam\Source\Repos\Toasts.Forms.Plugin\Toasts.Forms.Plugin.Droid\SnackbarNotification.cs:75
at Plugin.Toasts.SnackbarNotification.<Notify>b__5_2 (System.String toastId, Plugin.Toasts.NotificationResult result) [0x00000] in C:\Users\Adam\Source\Repos\Toasts.Forms.Plugin\Toasts.Forms.Plugin.Droid\SnackbarNotification.cs:43
at Plugin.Toasts.ToastCallback.OnDismissed (Android.Support.Design.Widget.Snackbar snackbar, System.Int32 evt) [0x0001d] in C:\Users\Adam\Source\Repos\Toasts.Forms.Plugin\Toasts.Forms.Plugin.Droid\SnackbarNotification.cs:99
at Android.Support.Design.Widget.Snackbar+Callback.n_OnDismissed_Landroid_support_design_widget_Snackbar_I (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_snackbar, System.Int32 evt) [0x00011] in <12ef52c9fdb344f58cbdf75db3fa86d8>:0
at (wrapper dynamic-method) System.Object:5cfc4f73-d1a7-4c55-93b6-d6acc659d030 (intptr,intptr,intptr,int)
The text was updated successfully, but these errors were encountered:
Tracing through the plugin, I've found that using SnackbarNotification can sometimes result in ToastClosed() being called twice.
The first time is with the action NotificationAction.Clicked from a click on the ViewText. This sets the reset event, and the id is removed from the dictionary.
The second time is from the callback from snackbar.SetCallback(). ToastCallback.OnDismissed is sometimes called with the event type DismissEventConsecutive, presumably due to a timing issue where the user has clicked it, but it self-dismisses as well. As the reset event was removed already from the step above, we see the exception above.
There was an issue raised back in April for this, but I'm still seeing the issue in version 3.2.0. When clicking on a notification, I occasionally get the error below:
The text was updated successfully, but these errors were encountered: