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
Currently we close toasts by their index in the toasts array. This works fine unless we're closing multiple toasts within one update call, in which case the first toast will be closed correctly, but the index of all subsequent toasts will be 1 less than before when processing other toast close events. This results in incorrect toasts being closed or, even more problematically, the following code panicking since we're calling Vec::remove() on an index that no longer exists:
Toast closing should be idempotent and order-independent. The easiest way to achieve this would be to add a UUID to each toast, and on close, filter toasts excluding that UUID rather than removing by exact index.
The text was updated successfully, but these errors were encountered:
Currently we close toasts by their index in the toasts array. This works fine unless we're closing multiple toasts within one update call, in which case the first toast will be closed correctly, but the index of all subsequent toasts will be 1 less than before when processing other toast close events. This results in incorrect toasts being closed or, even more problematically, the following code panicking since we're calling
Vec::remove()
on an index that no longer exists:keystache/src/app.rs
Lines 146 to 150 in b844ad4
Toast closing should be idempotent and order-independent. The easiest way to achieve this would be to add a UUID to each toast, and on close, filter toasts excluding that UUID rather than removing by exact index.
The text was updated successfully, but these errors were encountered: