mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
Toast: update visibility for newest toast
This commit is contained in:
@@ -165,13 +165,21 @@ Singleton {
|
||||
"timestamp": Date.now()
|
||||
}
|
||||
|
||||
// If there's already a toast showing, instantly start hide animation and show new one
|
||||
if (isShowingToast) {
|
||||
// Instantly start hide animation of current toast
|
||||
for (var i = 0; i < allToasts.length; i++) {
|
||||
allToasts[i].hide()
|
||||
}
|
||||
// Clear the queue since we're showing the new toast immediately
|
||||
messageQueue = []
|
||||
}
|
||||
|
||||
// Add to queue
|
||||
messageQueue.push(toastData)
|
||||
|
||||
// Process queue if not currently showing a toast
|
||||
if (!isShowingToast) {
|
||||
processQueue()
|
||||
}
|
||||
// Always process immediately for instant display
|
||||
processQueue()
|
||||
}
|
||||
|
||||
// Process the message queue
|
||||
@@ -181,11 +189,6 @@ Singleton {
|
||||
return
|
||||
}
|
||||
|
||||
if (isShowingToast) {
|
||||
// Wait for current toast to finish
|
||||
return
|
||||
}
|
||||
|
||||
var toastData = messageQueue.shift()
|
||||
isShowingToast = true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user