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 68e54cb7a..17190da1b 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) { @@ -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 () { @@ -750,6 +755,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"], {