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

@ -386,7 +386,11 @@ void Conversation::onClearButton()
void Conversation::setAvatar(const QString& path)
{
m_ui->avatar->setPixmap(path.size() == 0 ? Shared::iconPath("user", true) : path);
if (path.size() == 0) {
m_ui->avatar->setPixmap(Shared::icon("user", true).pixmap(QSize(50, 50)));
} else {
m_ui->avatar->setPixmap(path);
}
}
void Conversation::onAttachResize(const QSize& oldSize, const QSize& newSize)