From 578e9981a1b15d6469ae15ba753bdfa200362a7a Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 5 Aug 2014 07:42:18 +0000 Subject: - dynamic avatar loading for an info panel; - useless code removed git-svn-id: http://svn.miranda-ng.org/main/trunk@10060 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/TabSRMM/src/msgdlgutils.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'plugins/TabSRMM/src/msgdlgutils.cpp') diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp index 7300b48d64..b6ea38b281 100644 --- a/plugins/TabSRMM/src/msgdlgutils.cpp +++ b/plugins/TabSRMM/src/msgdlgutils.cpp @@ -542,6 +542,7 @@ void TSAPI ProcessAvatarChange(HWND hwnd, LPARAM lParam) dat->ace = Utils::loadAvatarFromAVS(dat->hContact); + GetAvatarVisibility(hwndDlg, dat); ShowPicture(dat, TRUE); if (dat->Panel->isActive()) SendMessage(hwndDlg, WM_SIZE, 0, 0); @@ -597,13 +598,7 @@ bool TSAPI GetAvatarVisibility(HWND hwndDlg, TWindowData *dat) else dat->bShowInfoAvatar = hideOverride == 1 ? true : dat->bShowInfoAvatar; - // reloads avatars - if (dat->bShowInfoAvatar) { - // panel and contact is shown, reloads contact's avatar -> panel - // user avatar -> bottom picture - Utils::setAvatarContact(dat->hwndPanelPic, dat->hContact); - } - + Utils::setAvatarContact(dat->hwndPanelPic, dat->hContact); SendMessage(dat->hwndContactPic, AVATAR_SETPROTOCOL, 0, (LPARAM)dat->cache->getActiveProto()); } else { @@ -638,9 +633,6 @@ bool TSAPI GetAvatarVisibility(HWND hwndDlg, TWindowData *dat) Utils::setAvatarContact(dat->hwndPanelPic, dat->hContact); } else Utils::setAvatarContact(dat->hwndContactPic, dat->hContact); - - if (!dat->bShowAvatar) - return false; } return dat->bShowAvatar; } -- cgit v1.2.3