fix: trying to call applycolors not too often

This commit is contained in:
quenousimporte 2023-10-11 21:24:20 +02:00
parent a685285177
commit 37de87fd3a
1 changed files with 3 additions and 3 deletions

View File

@ -315,8 +315,6 @@ var snippets = [
function seteditorcontent(content, silent)
{
md.value = content;
applycolors();
if (!silent)
{
datachanged();
@ -1236,6 +1234,7 @@ function applystyle()
{
title.style.color = settings.accentcolor;
}
applycolors();
}
function loadsettings()
@ -1264,7 +1263,6 @@ function loadsettings()
colored.hidden = !settings.colors;
md.style.color = settings.colors ? "transparent" : "inherit";
md.style.background = settings.colors ? "transparent" : "inherit";
applycolors();
}
function checksaved()
@ -2132,6 +2130,7 @@ function applycolors()
function datachanged()
{
applycolors();
resize();
saved = false;
@ -2743,6 +2742,7 @@ function bindfile(note)
setwindowtitle();
seteditorcontent(note.content || "", true);
applycolors();
preview.innerHTML = md2html(md.value);
if (changed)