Better indicate when a pushrule is disabled

This commit is contained in:
miruka 2021-02-28 14:37:36 -04:00
parent db24ebc082
commit bc0646ef90
2 changed files with 7 additions and 6 deletions

View File

@ -55,7 +55,7 @@ HFlickableColumnPopup {
rule.rule_id,
isBefore && position ? position : undefined,
! isBefore && position ? position : undefined,
enableCheck.checked,
! disableCheck.checked,
generalChecked ? details.matrixConditions : undefined,
contentRadio.checked ? details.idField.text : undefined,
actions,
@ -321,9 +321,9 @@ HFlickableColumnPopup {
}
HCheckBox {
id: enableCheck
text: qsTr("Enable this rule")
defaultChecked: root.rule.enabled
id: disableCheck
text: qsTr("Disable this rule")
defaultChecked: ! root.rule.enabled
Layout.fillWidth: true
}
}

View File

@ -566,7 +566,7 @@ QtObject {
const roomColor = theme.colors.accentText
const room = ModelStore.get(userId, "rooms").find(rule.rule_id)
return (
const text =
rule.rule_id === ".m.rule.master" ?
qsTr("Any message") :
@ -631,6 +631,7 @@ QtObject {
escapeHtml(room.display_name) :
escapeHtml(rule.rule_id)
)
return rule.enabled ? text : qsTr("%1 (disabled rule)").arg(text)
}
}