Repaint when the room avatar is received

This commit is contained in:
Konstantinos Sideris 2017-06-05 20:19:20 +03:00
parent 26dfbfd08c
commit da190593c8
2 changed files with 4 additions and 3 deletions

View File

@ -104,4 +104,5 @@ inline RoomState RoomInfoListItem::state() const
inline void RoomInfoListItem::setAvatar(const QImage &img)
{
roomAvatar_ = QPixmap::fromImage(img.scaled(IconSize, IconSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
update();
}

View File

@ -189,13 +189,13 @@ void RoomInfoListItem::paintEvent(QPaintEvent *event)
void RoomInfoListItem::updateUnreadMessageCount(int count)
{
unreadMsgCount_ += count;
repaint();
update();
}
void RoomInfoListItem::clearUnreadMessageCount()
{
unreadMsgCount_ = 0;
repaint();
update();
}
void RoomInfoListItem::setPressedState(bool state)
@ -212,7 +212,7 @@ void RoomInfoListItem::setPressedState(bool state)
void RoomInfoListItem::setState(const RoomState &new_state)
{
state_ = new_state;
repaint();
update();
}
void RoomInfoListItem::contextMenuEvent(QContextMenuEvent *event)