New default pushrules

Add handling for new default push rules added in 1.7 also add a generic unknown handling for if any others are added in the future so they don't appear in keywords
This commit is contained in:
James Graham
2023-09-02 15:48:50 +00:00
parent 5871903529
commit ede2707767
3 changed files with 39 additions and 0 deletions

View File

@@ -176,6 +176,32 @@ Kirigami.ScrollablePage {
}
}
}
MobileForm.FormHeader {
Layout.fillWidth: true
title: i18n("Unknown")
visible: unknownModel.rowCount() > 0
}
MobileForm.FormCard {
Layout.fillWidth: true
visible: unknownModel.rowCount() > 0
contentItem: ColumnLayout {
spacing: 0
Repeater {
model: KSortFilterProxyModel {
id: unknownModel
sourceModel: Controller.pushRuleModel
filterRowCallback: function(source_row, source_parent) {
let sectionRole = sourceModel.data(sourceModel.index(source_row, 0, source_parent), PushRuleModel.SectionRole)
return sectionRole == PushNotificationSection.Unknown;
}
}
delegate: ruleDelegate
}
}
}
}
Component {