Settings window #20
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
[General]
|
[General]
|
||||||
FunctionsSpacing=true
|
FunctionsSpacing=true
|
||||||
IndentWidth=4
|
IndentWidth=4
|
||||||
MaxColumnWidth=80
|
MaxColumnWidth=-1
|
||||||
NewlineType=native
|
NewlineType=native
|
||||||
NormalizeOrder=true
|
NormalizeOrder=true
|
||||||
ObjectsSpacing=true
|
ObjectsSpacing=true
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import qs.Config
|
|||||||
Singleton {
|
Singleton {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
|
readonly property var appCooldownMap: new Map()
|
||||||
property alias dnd: props.dnd
|
property alias dnd: props.dnd
|
||||||
property list<Notif> list: []
|
property list<Notif> list: []
|
||||||
property bool loaded
|
property bool loaded
|
||||||
@@ -23,8 +24,6 @@ Singleton {
|
|||||||
readonly property list<Notif> popups: list.filter(n => n.popup)
|
readonly property list<Notif> popups: list.filter(n => n.popup)
|
||||||
property alias server: server
|
property alias server: server
|
||||||
|
|
||||||
readonly property var appCooldownMap: new Map()
|
|
||||||
|
|
||||||
function shouldThrottle(appName: string): bool {
|
function shouldThrottle(appName: string): bool {
|
||||||
if (props.dnd)
|
if (props.dnd)
|
||||||
return false;
|
return false;
|
||||||
@@ -42,7 +41,7 @@ Singleton {
|
|||||||
if (now < until)
|
if (now < until)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
appCooldownMap.set( key, now + cooldownMs )
|
appCooldownMap.set(key, now + cooldownMs);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user