summaryrefslogtreecommitdiff
path: root/contents/ui/main.qml
diff options
context:
space:
mode:
authorFrederick Yin <fkfd@fkfd.me>2022-04-09 15:22:17 +0800
committerFrederick Yin <fkfd@fkfd.me>2022-04-09 15:22:17 +0800
commit0a2bf162712d3c5d468b8b93815e6e2f161d555f (patch)
tree018c704e40d6bae89dc3ac95c1342dd01ca47558 /contents/ui/main.qml
parent136be4b97cb759d8dc5f63b519fcb09a0fd8638b (diff)
Rename General config group to Canvas, allow hiding submitted assignments
Diffstat (limited to 'contents/ui/main.qml')
-rw-r--r--contents/ui/main.qml12
1 files changed, 8 insertions, 4 deletions
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)
+ }
}
})
})