summaryrefslogtreecommitdiff
path: root/contents/ui/main.qml
diff options
context:
space:
mode:
Diffstat (limited to 'contents/ui/main.qml')
-rw-r--r--contents/ui/main.qml12
1 files changed, 6 insertions, 6 deletions
diff --git a/contents/ui/main.qml b/contents/ui/main.qml
index bc49207..1c7d25f 100644
--- a/contents/ui/main.qml
+++ b/contents/ui/main.qml
@@ -55,6 +55,10 @@ Item {
let announcementCount = 0
let assignmentCount = 0
activityStream.forEach(activity => {
+ let important = plasmoid.configuration.importantActivities.includes(
+ activity.id.toString()
+ )
+
if (activity.type == "Announcement") {
announcementsModel.append({
type: "announcement",
@@ -63,9 +67,7 @@ Item {
course: course[1],
title: activity.title,
url: activity.html_url,
- important: plasmoid.configuration.importantActivities.includes(
- activity.id.toString()
- ),
+ important,
})
announcementCount++
} else if (activity.type == "Submission") {
@@ -77,9 +79,7 @@ Item {
title: activity.title,
due: activity.assignment.due_at,
url: activity.html_url,
- important: plasmoid.configuration.importantActivities.includes(
- activity.id.toString()
- ),
+ important,
})
assignmentCount++
}