Favourites:

- dispatch event when adding / removing preference
- favourite widgets listen for event to update
This commit is contained in:
nathan
2024-06-13 16:11:07 -06:00
parent b2d3d6fced
commit c845088ebc
3 changed files with 87 additions and 14 deletions

View File

@@ -1230,6 +1230,15 @@ export abstract class EgwApp
this.egw.set_preference(this.appname, favorite_pref, favorite);
}
// Trigger event so widgets can update
document.dispatchEvent(new CustomEvent("preferenceChange", {
bubbles: true,
detail: {
application: this.appname,
preference: favorite_pref
}
}));
// Add to list immediately
if(this.sidebox)
{