diff options
author | Frederick Yin <fkfd@fkfd.me> | 2022-04-09 11:41:58 +0800 |
---|---|---|
committer | Frederick Yin <fkfd@fkfd.me> | 2022-04-09 11:41:58 +0800 |
commit | 6606ada36caa0b1562b3a08d10e8e141be1802e1 (patch) | |
tree | 25a96e26a4145b856a8b6256dafd8e175edae9c8 /contents/ui/ActivityView.qml | |
parent | 5188870ea50dc6d8db56ea003270769bc4ec2011 (diff) |
Use separate API endpoints
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 } } } |