kcms/scripts: Replace magic number with named enum member of NewStuff events

This commit is contained in:
ivan tkachenko 2023-05-31 16:45:02 +03:00
parent 5de83e78cc
commit bef357db5b
No known key found for this signature in database
GPG key ID: AF72731B7C654CB3

View file

@ -64,8 +64,8 @@ ScrollViewKCM {
text: i18n("Get New Scripts…")
visible: KAuthorized.authorize(KAuthorized.GHNS)
configFile: "kwinscripts.knsrc"
onEntryEvent: function (entry, event) {
if (event == 1) { // StatusChangedEvent
onEntryEvent: (entry, event) => {
if (event === NewStuff.Engine.StatusChangedEvent) {
kcm.onGHNSEntriesChanged()
}
}