remove toast animations to fix green flash

This commit is contained in:
2026-01-20 13:32:57 +01:00
parent 0d8415ba4e
commit e722680863
2 changed files with 5 additions and 32 deletions

View File

@@ -252,23 +252,15 @@ function showToast(message, type)
type_class = " toast-warning"
end
-- Create toast with visible animation class
local toast_html = '<div id="active-toast" class="toast toast-visible' .. type_class .. '"><span>' .. message .. '</span></div>'
-- Create toast (no animation to avoid flash)
local toast_html = '<div id="active-toast" class="toast' .. type_class .. '"><span>' .. message .. '</span></div>'
container.inner_rml = toast_html
-- Auto-hide after 2.5 seconds (start hide animation, then remove)
-- Auto-hide after 2.5 seconds
if setTimeout then
active_toast_id = setTimeout(function()
local toast = shell_document:GetElementById("active-toast")
if toast then
-- Switch to hiding animation
toast:SetAttribute("class", "toast toast-hiding" .. type_class)
-- Remove after animation completes
setTimeout(function()
container.inner_rml = ""
active_toast_id = nil
end, 300)
end
container.inner_rml = ""
active_toast_id = nil
end, 2500)
end