fix persisted notification dismiss: unique IDs to avoid D-Bus collision
This commit is contained in:
parent
427aeb438c
commit
d28100016b
1 changed files with 4 additions and 1 deletions
|
|
@ -142,7 +142,10 @@ QtObject {
|
||||||
onLoaded: {
|
onLoaded: {
|
||||||
try {
|
try {
|
||||||
const data = JSON.parse(text());
|
const data = JSON.parse(text());
|
||||||
for (const n of data) {
|
for (let i = 0; i < data.length; i++) {
|
||||||
|
const n = data[i];
|
||||||
|
// Prefix persisted IDs to avoid collision with live D-Bus IDs
|
||||||
|
n.id = "p_" + (n.id ?? i) + "_" + n.time;
|
||||||
n.popup = false;
|
n.popup = false;
|
||||||
n.closed = false;
|
n.closed = false;
|
||||||
n.notification = null;
|
n.notification = null;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue