fix: resolve persisted notification app labels

This commit is contained in:
Gabriel Brown
2026-08-18 06:14:07 -04:00
parent c038c57278
commit eff0bc44ff
4 changed files with 56 additions and 3 deletions
@@ -55,6 +55,11 @@ ShellRoot {
const appId = Notifs.notificationAppId(signal);
const initialRules = DesktopPreferences.get("notificationAppRules");
const fallback = root.notification(6, "", "Fallback Terminal");
Notifs.handleNotification(fallback);
const fallbackId = Notifs.notificationAppId(fallback);
const fallbackApplication = Notifs.applications.find(app => app.id === fallbackId);
root.resetNotifications();
Notifs.setAppRule(appId, { enabled: false });
const muted = root.notification(2, "org.signal.Signal.desktop", "Signal");
@@ -80,6 +85,10 @@ ShellRoot {
return JSON.stringify({
appId: appId,
initialRules: initialRules,
fallback: {
id: fallbackId,
application: fallbackApplication
},
muted: mutedResult,
dnd: {
tracked: dnd.tracked,
@@ -109,5 +118,9 @@ ShellRoot {
function restored(): string {
return JSON.stringify(DesktopPreferences.get("notificationAppRules"));
}
function applications(): string {
return JSON.stringify(Notifs.applications);
}
}
}