From 20e35d0b414ad45be2b8a5bc49b12c53338d8296 Mon Sep 17 00:00:00 2001 From: daria <95225431+dariiing@users.noreply.github.com> Date: Thu, 4 Sep 2025 15:58:42 +0300 Subject: [PATCH] fix icon flickering issue --- www/common/common-interface.js | 4 ++-- www/common/common-ui-elements.js | 2 +- www/common/inner/sidebar-layout.js | 2 +- www/common/toolbar.js | 2 +- www/kanban/inner.js | 4 ++-- www/pad/inner.js | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/www/common/common-interface.js b/www/common/common-interface.js index 0354c5f04..8b20683a5 100644 --- a/www/common/common-interface.js +++ b/www/common/common-interface.js @@ -356,7 +356,7 @@ define([ $container.append($form); isEdit = false; called = false; - setTimeout( () => Lucide.createIcons(), 0); + Lucide.createIcons(); }); }; resetUI(); @@ -996,7 +996,6 @@ define([ }; UI.passwordInput = function (opts, displayEye) { - setTimeout( () => Lucide.createIcons(), 0); opts = opts || {}; var attributes = merge({ type: 'password', @@ -1046,6 +1045,7 @@ define([ }); } + Lucide.createIcons(); return h('span.cp-password-container', [ input, eye diff --git a/www/common/common-ui-elements.js b/www/common/common-ui-elements.js index f0fb98bb9..1858a5681 100644 --- a/www/common/common-ui-elements.js +++ b/www/common/common-ui-elements.js @@ -2961,7 +2961,6 @@ define([ icon: UI.getFileIcon({type: type}) }); var redraw = function (index) { - setTimeout( ()=> Lucide.createIcons()); if (index < 0) { i = 0; } else if (index > allData.length - 1) { return; } else { i = index; } @@ -3013,6 +3012,7 @@ define([ $('.cp-creation-template-container').find('[tabindex]:not([tabindex="-1"])').filter(':visible').first().focus(); }); if (i < TEMPLATES_DISPLAYED) { $(left).addClass('hidden'); } + Lucide.createIcons(); }; if (fromFileData) { var todo = function (thumbnail) { diff --git a/www/common/inner/sidebar-layout.js b/www/common/inner/sidebar-layout.js index 3d332c262..90d488e4f 100644 --- a/www/common/inner/sidebar-layout.js +++ b/www/common/inner/sidebar-layout.js @@ -400,7 +400,7 @@ define([ common.setHash(active); setTimeout(() => { sidebar.openCategory(active); }); - setTimeout( () => Lucide.createIcons()); + Lucide.createIcons(); $leftside.append(container); }; diff --git a/www/common/toolbar.js b/www/common/toolbar.js index 9cb761021..c7ba90e73 100644 --- a/www/common/toolbar.js +++ b/www/common/toolbar.js @@ -249,7 +249,6 @@ MessengerUI, Messages, Pages, PadTypes, Lucide, Icons) { var $spansmall = $('').append($editIcon, $editCount, $separator, $viewIcon, $viewCount); $userButtons.find('.cp-toolbar-userlist-button').empty().append($spansmall); - setTimeout( () => Lucide.createIcons(), 0); if (!online || toolbar.isDeleted) { return; } if (metadataMgr.isDegraded() === true) { return; } @@ -432,6 +431,7 @@ MessengerUI, Messages, Pages, PadTypes, Lucide, Icons) { viewText += numberOfViewUsers + ' ' + viewerText + ''; $editUsers.append(viewText); } + Lucide.createIcons(); }; var initUserList = function (toolbar, config) { diff --git a/www/kanban/inner.js b/www/kanban/inner.js index e44b2a572..680b28a24 100644 --- a/www/kanban/inner.js +++ b/www/kanban/inner.js @@ -185,7 +185,6 @@ define([ var createEditModal = function (framework, kanban) { if (framework.isReadOnly()) { return; } if (editModal) { return editModal; } - setTimeout( () => Lucide.createIcons(), 0); var dataObject = {}; var isBoard, id; @@ -521,6 +520,7 @@ define([ }); }); + Lucide.createIcons(); return { modal: modal, setId: setId, @@ -1185,7 +1185,7 @@ define([ $tag.attr('aria-pressed', 'true'); } commitTags(); - setTimeout( () => Lucide.createIcons(), 0); + Lucide.createIcons(); }).keydown(function (e) { if (e.which === 13 || e.which === 32) { $tag.click(); diff --git a/www/pad/inner.js b/www/pad/inner.js index c66126c48..c7c8f8670 100644 --- a/www/pad/inner.js +++ b/www/pad/inner.js @@ -214,7 +214,6 @@ define([ var mkSettingsMenu = function(framework) { var getSettings = function () { - setTimeout( () => Lucide.createIcons(), 0); var $d = $(h('div.cp-pad-settings-dialog')); var common = framework._.sfCommon; var metadataMgr = common.getMetadataMgr(); @@ -339,6 +338,7 @@ define([ $comments[0], ]); + Lucide.createIcons(); return $d[0]; }; @@ -647,7 +647,6 @@ define([ }; var andThen2 = function(editor, Ckeditor, framework) { - setTimeout(() => Lucide.createIcons()); var mediaTagMap = {}; var $contentContainer = $('#cke_1_contents'); var $html = $('html'); @@ -1330,6 +1329,7 @@ define([ } }); + Lucide.createIcons(); framework.start(); };