notif animations

This commit is contained in:
end-4
2025-04-20 00:48:43 +02:00
parent 905d26570f
commit 3096107d6b
6 changed files with 144 additions and 18 deletions
@@ -130,7 +130,7 @@ Singleton {
function setActivePlayer(player: MprisPlayer) {
const targetPlayer = player ?? Mpris.players[0];
console.log(`setactive: ${targetPlayer} from ${activePlayer}`)
console.log(`[Mpris] Active player ${targetPlayer} << ${activePlayer}`)
if (targetPlayer && this.activePlayer) {
this.__reverse = Mpris.players.indexOf(targetPlayer) < Mpris.players.indexOf(this.activePlayer);
@@ -66,6 +66,15 @@ Singleton {
root.discard(id);
}
function discardAll() {
root.list = []
triggerListChange()
notifFileView.setText(JSON.stringify(root.list, null, 2))
notifServer.trackedNotifications.values.forEach((notif) => {
notif.dismiss()
})
}
function attemptInvokeAction(id, notifIdentifier) {
const notifServerIndex = notifServer.trackedNotifications.values.findIndex((notif) => notif.id === id);
if (notifServerIndex !== -1) {