From 57d930afa6fda0f07c71c2384c9fe7f58f1940e0 Mon Sep 17 00:00:00 2001 From: DianaXWiki Date: Mon, 24 Mar 2025 11:24:57 +0200 Subject: [PATCH 1/3] Fix multiple avatar images --- www/profile/inner.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/www/profile/inner.js b/www/profile/inner.js index 92cee36c9..c65b121a4 100644 --- a/www/profile/inner.js +++ b/www/profile/inner.js @@ -619,7 +619,11 @@ define([ }; var updateValues = APP.updateValues = function (data) { - refreshAvatar(data); + // Only update avatar if it has changed + if (!APP._lastUpdate || APP._lastUpdate.avatar !== data.avatar) { + refreshAvatar(data); + } + // Always update other profile information refreshName(data); refreshLink(data); refreshDescription(data); @@ -627,6 +631,7 @@ define([ refreshMute(data); setPublicKeyButton(data); setCopyDataButton(data); + APP._lastUpdate = data; }; var createToolbar = function () { From e168dde80216676c8570ca4a276ce69b4d50b72e Mon Sep 17 00:00:00 2001 From: DianaXWiki Date: Mon, 24 Mar 2025 11:30:43 +0200 Subject: [PATCH 2/3] Fix initial load avatar for contacts --- www/profile/inner.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/www/profile/inner.js b/www/profile/inner.js index c65b121a4..e6fae53bd 100644 --- a/www/profile/inner.js +++ b/www/profile/inner.js @@ -754,6 +754,8 @@ define([ if (JSON.stringify(lm.proxy) === '{}') { return void onCorruptedCache(); } + // Force avatar update on initial load + APP._lastUpdate = null; updateValues(lm.proxy); UI.removeLoadingScreen(); common.mailbox.subscribe(["notifications"], { From dedc606e4508704846e42a02786764a1ce5f8f42 Mon Sep 17 00:00:00 2001 From: DianaXWiki Date: Mon, 24 Mar 2025 11:47:38 +0200 Subject: [PATCH 3/3] Change parent class of display name --- www/profile/app-profile.less | 9 +++++++++ www/profile/inner.js | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/www/profile/app-profile.less b/www/profile/app-profile.less index 832354551..388b0e0b8 100644 --- a/www/profile/app-profile.less +++ b/www/profile/app-profile.less @@ -22,6 +22,9 @@ display: none !important; } + .cp-app-profile-section:first-child { + margin-top: 1rem; + } #cp-app-profile-header { display: flex; @@ -172,9 +175,15 @@ #cp-app-profile-description { position: relative; font-size: 16px; + max-width: 100%; //margin-bottom: 20px; .cp-app-profile-description-code { display: none; + .cp-markdown-toolbar { + display: flex; + height: auto; + flex-wrap: wrap; + } } #cp-app-profile-description-info { overflow-wrap: anywhere; diff --git a/www/profile/inner.js b/www/profile/inner.js index e6fae53bd..676bdaceb 100644 --- a/www/profile/inner.js +++ b/www/profile/inner.js @@ -134,7 +134,7 @@ define([ }; var addDisplayName = function ($container) { - var $block = $('
', {'class': DISPLAYNAME_ID}).appendTo($container); + var $block = $('
', {'class': PROFILE_SECTION}).appendTo($container); APP.$name = $('', {'class': DISPLAYNAME_ID}).appendTo($block); }; var refreshName = function (data) {