wobsoriano/svelte-sonner

bug: Timer doesn't refresh when updating the same toast.

Closed this issue · 2 comments

When updating the same toast via toast.id, the timer doesn't refresh so toast will disappear after the original duration expires. Should reset the timer per update.

Related to #35

I'm not sure if it makes sense to reset the timer on update if a duration isn't passed with that update. What if my intention is to keep the toast for the same total duration, but update the appearance part of the way through? Would this still be possible?

Edit: meh maybe it does make sense, as it feels like the intuitive thing when updating to basically swap a toast with a new one.