live_toast icon indicating copy to clipboard operation
live_toast copied to clipboard

Update toast duration does not work

Open jzaehrin opened this issue 10 months ago • 3 comments

It seems impossible to update the duration of a toast already in progress. The aim is to reuse the previous toast to display the result of the request.

uuid =
  LiveToast.send_toast(
    :info,
    gettext("Test in progress"),
    duration: 100_000
  )

# later in the live view

  LiveToast.send_toast(
    :success,
    gettext("Test finished"),
    duration: 3_000,
    uuid: uuid
  )

The toast persists until the timeout defined in the first call. Is it possible that this is a current limitation?

We're currently using version 0.6.4 because 0.7.0 conflicts with our version of Gettext.

jzaehrin avatar Feb 10 '25 13:02 jzaehrin

Interesting. I didn't even think about trying that! We can definitely make that work.

Also sorry about the latest version, I have quite a few things on master that need a new release cut. You can point to master and I think the gettext thing is fixed. I'll cut a new release soon. I'm just paranoid about releasing something broken so I try to let things sit on master a while.

srcrip avatar Feb 14 '25 14:02 srcrip

No problem for version 0.7.0, I totally understand! We've just skipped the update for now.

it would be really useful if you could implement it.

jzaehrin avatar Feb 14 '25 15:02 jzaehrin

+1 would be agreat feature

AJReade avatar Oct 05 '25 21:10 AJReade