Don't read avatarUrl from local profile, if no global avatar is set
This commit is contained in:
parent
7d5e82c888
commit
e6878ee298
3 changed files with 12 additions and 11 deletions
|
|
@ -39,7 +39,8 @@ UserProfile::UserProfile(QString roomid,
|
|||
getGlobalProfileData();
|
||||
}
|
||||
|
||||
if (!cache::client() || !cache::client()->isDatabaseReady())
|
||||
if (!cache::client() || !cache::client()->isDatabaseReady() ||
|
||||
!ChatPage::instance()->timelineManager())
|
||||
return;
|
||||
|
||||
connect(cache::client(),
|
||||
|
|
@ -127,10 +128,7 @@ UserProfile::displayName()
|
|||
QString
|
||||
UserProfile::avatarUrl()
|
||||
{
|
||||
return (isGlobalUserProfile() && globalAvatarUrl != "")
|
||||
? globalAvatarUrl
|
||||
: cache::avatarUrl(roomid_, userid_);
|
||||
;
|
||||
return isGlobalUserProfile() ? globalAvatarUrl : cache::avatarUrl(roomid_, userid_);
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue