small refactorings of auto readonly size

This commit is contained in:
zadam
2021-09-20 21:12:35 +02:00
parent b85cf07a28
commit 9c9a3fc030
4 changed files with 21 additions and 21 deletions

View File

@@ -193,12 +193,12 @@ class NoteContext extends Component {
const noteComplement = await this.getNoteComplement();
const SIZE_LIMIT = this.note.type === 'text' ?
options.getInt('autoReadonlySize')
: options.getInt('autoCodeReadonlySize');
const sizeLimit = this.note.type === 'text' ?
options.getInt('autoReadonlySizeText')
: options.getInt('autoReadonlySizeCode');
return noteComplement.content
&& noteComplement.content.length > SIZE_LIMIT
&& noteComplement.content.length > sizeLimit
&& !this.note.hasLabel('autoReadOnlyDisabled');
}