mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-23 03:18:49 +03:00
Repaint when the room avatar is received
This commit is contained in:
parent
26dfbfd08c
commit
da190593c8
2 changed files with 4 additions and 3 deletions
|
@ -104,4 +104,5 @@ inline RoomState RoomInfoListItem::state() const
|
||||||
inline void RoomInfoListItem::setAvatar(const QImage &img)
|
inline void RoomInfoListItem::setAvatar(const QImage &img)
|
||||||
{
|
{
|
||||||
roomAvatar_ = QPixmap::fromImage(img.scaled(IconSize, IconSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
|
roomAvatar_ = QPixmap::fromImage(img.scaled(IconSize, IconSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation));
|
||||||
|
update();
|
||||||
}
|
}
|
||||||
|
|
|
@ -189,13 +189,13 @@ void RoomInfoListItem::paintEvent(QPaintEvent *event)
|
||||||
void RoomInfoListItem::updateUnreadMessageCount(int count)
|
void RoomInfoListItem::updateUnreadMessageCount(int count)
|
||||||
{
|
{
|
||||||
unreadMsgCount_ += count;
|
unreadMsgCount_ += count;
|
||||||
repaint();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
void RoomInfoListItem::clearUnreadMessageCount()
|
void RoomInfoListItem::clearUnreadMessageCount()
|
||||||
{
|
{
|
||||||
unreadMsgCount_ = 0;
|
unreadMsgCount_ = 0;
|
||||||
repaint();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
void RoomInfoListItem::setPressedState(bool state)
|
void RoomInfoListItem::setPressedState(bool state)
|
||||||
|
@ -212,7 +212,7 @@ void RoomInfoListItem::setPressedState(bool state)
|
||||||
void RoomInfoListItem::setState(const RoomState &new_state)
|
void RoomInfoListItem::setState(const RoomState &new_state)
|
||||||
{
|
{
|
||||||
state_ = new_state;
|
state_ = new_state;
|
||||||
repaint();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
void RoomInfoListItem::contextMenuEvent(QContextMenuEvent *event)
|
void RoomInfoListItem::contextMenuEvent(QContextMenuEvent *event)
|
||||||
|
|
Loading…
Reference in a new issue