From 0a2bf162712d3c5d468b8b93815e6e2f161d555f Mon Sep 17 00:00:00 2001 From: Frederick Yin Date: Sat, 9 Apr 2022 15:22:17 +0800 Subject: Rename General config group to Canvas, allow hiding submitted assignments --- contents/ui/main.qml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'contents/ui/main.qml') diff --git a/contents/ui/main.qml b/contents/ui/main.qml index 5593b8c..f42ed15 100644 --- a/contents/ui/main.qml +++ b/contents/ui/main.qml @@ -46,6 +46,8 @@ Item { line => { return line.split(" ", 2) } ) + const showSubmittedAssignments = plasmoid.configuration.showSubmittedAssignments + announcementsModel.clear() assignmentsModel.clear() @@ -84,10 +86,12 @@ Item { important: plasmoid.configuration.importantAssignments.includes(assignment.id.toString()), } - if (info.important) { - assignmentsModel.insert(importantCount.assignments++, info) - } else { - assignmentsModel.append(info) + if (!info.submitted || showSubmittedAssignments) { + if (info.important) { + assignmentsModel.insert(importantCount.assignments++, info) + } else { + assignmentsModel.append(info) + } } }) }) -- cgit v1.2.3