fix: resolve persisted notification app labels
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user