Use LiveToast instead of built-in flash helpers

So that they can stack and get dismissed automatically
This commit is contained in:
Claudio Ortolina
2025-07-16 15:26:30 +01:00
parent 41f040363e
commit acd34424f7
18 changed files with 64 additions and 61 deletions
@@ -147,12 +147,12 @@ defmodule MusicLibraryWeb.ReleaseComponent do
{:noreply,
socket
|> assign(:already_scrobbled, true)
|> put_flash(:info, gettext("Release scrobbled successfully"))}
|> put_toast(:info, gettext("Release scrobbled successfully"))}
{:error, reason} ->
{:noreply,
socket
|> put_flash(
|> put_toast(
:error,
gettext("Error scrobbling release") <> "," <> inspect(reason)
)}
@@ -177,12 +177,12 @@ defmodule MusicLibraryWeb.ReleaseComponent do
{:noreply,
socket
|> assign(:already_scrobbled, true)
|> put_flash(:info, gettext("Disc scrobbled successfully"))}
|> put_toast(:info, gettext("Disc scrobbled successfully"))}
{:error, reason} ->
{:noreply,
socket
|> put_flash(
|> put_toast(
:error,
gettext("Error scrobbling disc") <> "," <> inspect(reason)
)}