diff options
Diffstat (limited to 'contents/ui/ActivityView.qml')
-rw-r--r-- | contents/ui/ActivityView.qml | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/contents/ui/ActivityView.qml b/contents/ui/ActivityView.qml index cbbd6f9..e6945f2 100644 --- a/contents/ui/ActivityView.qml +++ b/contents/ui/ActivityView.qml @@ -145,7 +145,13 @@ RowLayout { important = !important activityLabel.font.bold = important activityLabel.color = important ? PlasmaCore.Theme.negativeTextColor : PlasmaCore.Theme.textColor - let importantActivities = plasmoid.configuration.importantActivities + + const configKeys = { + announcement: "importantAnnouncements", + assignment: "importantAssignments", + } + + let importantActivities = plasmoid.configuration[configKeys[type]] if (important) { if (!importantActivities.includes(activityId)) { importantActivities.push(activityId) @@ -155,7 +161,7 @@ RowLayout { importantActivities.splice(importantActivities.indexOf(activityId), 1) } // save config - plasmoid.configuration.importantActivities = importantActivities + plasmoid.configuration[configKeys[type]] = importantActivities } } } |