some bugs and corner cases

This commit is contained in:
Blue 2019-12-24 11:42:46 +03:00
parent dd62f84acc
commit 0bcfd779b8
4 changed files with 44 additions and 6 deletions

View file

@ -1556,7 +1556,11 @@ void Core::Account::onOwnVCardReceived(const QXmppVCardIq& card)
QString Core::Account::getAvatarPath() const
{
return QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + "/" + name + "/" + "avatar." + avatarType;
if (avatarType.size() == 0) {
return "";
} else {
return QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + "/" + name + "/" + "avatar." + avatarType;
}
}
void Core::Account::onContactAvatarChanged(Shared::Avatar type, const QString& path)