allow #newNotesOnTop=false to negate previous setting, closes #3796

This commit is contained in:
zadam
2023-04-03 21:08:32 +02:00
parent a0e9ac73c9
commit d100b0dc07
4 changed files with 31 additions and 3 deletions

View File

@@ -532,6 +532,20 @@ class BNote extends AbstractBeccaEntity {
*/
hasLabel(name, value) { return this.hasAttribute(LABEL, name, value); }
/**
* @param {string} name - label name
* @returns {boolean} true if label exists (including inherited) and does not have "false" value.
*/
isLabelTruthy(name) {
const label = this.getLabel(name);
if (!label) {
return false;
}
return label && label.value !== 'false';
}
/**
* @param {string} name - label name
* @param {string} [value] - label value