use isLabelTruthy() for most binary labels

This commit is contained in:
zadam
2023-06-29 00:14:12 +02:00
parent 430f2975f8
commit a46c5a2243
14 changed files with 34 additions and 20 deletions

View File

@@ -65,10 +65,10 @@ export default class EditabilitySelectWidget extends NoteContextAwareWidget {
async refreshWithNote(note) {
let editability = 'auto'
if (this.note.hasLabel('readOnly')) {
if (this.note.isLabelTruthy('readOnly')) {
editability = 'readOnly';
}
else if (this.note.hasLabel('autoReadOnlyDisabled')) {
else if (this.note.isLabelTruthy('autoReadOnlyDisabled')) {
editability = 'autoReadOnlyDisabled';
}