fix swaync notification parsing, use alt field
This commit is contained in:
parent
43c2541ccd
commit
784ded0a32
1 changed files with 4 additions and 4 deletions
|
|
@ -27,10 +27,10 @@ M.BarSection {
|
||||||
onRead: line => {
|
onRead: line => {
|
||||||
try {
|
try {
|
||||||
const d = JSON.parse(line);
|
const d = JSON.parse(line);
|
||||||
const cls = d.class ?? "";
|
const alt = d.alt ?? "";
|
||||||
root.count = d.count ?? 0;
|
root.count = parseInt(d.text) || 0;
|
||||||
root.dnd = cls.includes("dnd");
|
root.dnd = alt.startsWith("dnd");
|
||||||
root.inhibited = cls.includes("inhibited");
|
root.inhibited = alt.includes("inhibited");
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue