From b026a7f1b2920b3b9639f9b9fe30f8dc8473461d Mon Sep 17 00:00:00 2001 From: Frederick Yin Date: Thu, 7 Apr 2022 12:26:24 +0800 Subject: Save and load important announcements from config --- contents/ui/main.qml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'contents/ui/main.qml') diff --git a/contents/ui/main.qml b/contents/ui/main.qml index 48d51b8..4872c3c 100644 --- a/contents/ui/main.qml +++ b/contents/ui/main.qml @@ -57,7 +57,11 @@ Item { index: index, course: course[1], title: activity.title, - url: activity.html_url + url: activity.html_url, + important: plasmoid.configuration.importantAnnouncements.includes( + activity.announcement_id.toString() + ), + announcementId: activity.announcement_id }) } }) @@ -92,6 +96,8 @@ Item { course: "CS101" title: "Title of the announcement" url: "https://xkcd.com" + important: true + announcementId: 0 } } -- cgit v1.2.3