mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-05 05:12:05 -04:00
notifications: Update Material 3 baselines
- New right-click to mute option - New independent Notification Animation settings
This commit is contained in:
@@ -501,6 +501,8 @@ Singleton {
|
||||
property int notificationTimeoutCritical: 0
|
||||
property bool notificationCompactMode: false
|
||||
property int notificationPopupPosition: SettingsData.Position.Top
|
||||
property int notificationAnimationSpeed: SettingsData.AnimationSpeed.Short
|
||||
property int notificationCustomAnimationDuration: 400
|
||||
property bool notificationHistoryEnabled: true
|
||||
property int notificationHistoryMaxCount: 50
|
||||
property int notificationHistoryMaxAgeDays: 7
|
||||
@@ -2152,6 +2154,24 @@ Singleton {
|
||||
saveSettings();
|
||||
}
|
||||
|
||||
function addMuteRuleForApp(appName, desktopEntry) {
|
||||
var rules = JSON.parse(JSON.stringify(notificationRules || []));
|
||||
var pattern = (desktopEntry && desktopEntry !== "") ? desktopEntry : (appName || "");
|
||||
var field = (desktopEntry && desktopEntry !== "") ? "desktopEntry" : "appName";
|
||||
if (pattern === "")
|
||||
return;
|
||||
rules.push({
|
||||
enabled: true,
|
||||
field: field,
|
||||
pattern: pattern,
|
||||
matchType: "exact",
|
||||
action: "mute",
|
||||
urgency: "default"
|
||||
});
|
||||
notificationRules = rules;
|
||||
saveSettings();
|
||||
}
|
||||
|
||||
function updateNotificationRule(index, ruleData) {
|
||||
var rules = JSON.parse(JSON.stringify(notificationRules || []));
|
||||
if (index < 0 || index >= rules.length)
|
||||
|
||||
Reference in New Issue
Block a user