From 6606ada36caa0b1562b3a08d10e8e141be1802e1 Mon Sep 17 00:00:00 2001 From: Frederick Yin Date: Sat, 9 Apr 2022 11:41:58 +0800 Subject: Use separate API endpoints --- contents/ui/ActivityView.qml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'contents/ui/ActivityView.qml') 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 } } } -- cgit v1.2.3