summary refs log tree commit diff
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2017-06-05 20:19:20 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2017-06-05 20:19:20 +0300
commitda190593c8b2739692d69718da91792f35d089e0 (patch)
tree71657311f3437c8a8d35c87e0d95e1455c0454ea
parentLazy load initial timeline events (diff)
downloadnheko-da190593c8b2739692d69718da91792f35d089e0.tar.xz
Repaint when the room avatar is received
-rw-r--r--include/RoomInfoListItem.h1
-rw-r--r--src/RoomInfoListItem.cc6
2 files changed, 4 insertions, 3 deletions
diff --git a/include/RoomInfoListItem.h b/include/RoomInfoListItem.h
index 40a1cbb0..12d5abb1 100644
--- a/include/RoomInfoListItem.h
+++ b/include/RoomInfoListItem.h
@@ -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();
 }
diff --git a/src/RoomInfoListItem.cc b/src/RoomInfoListItem.cc
index 3d4c5355..be1b4133 100644
--- a/src/RoomInfoListItem.cc
+++ b/src/RoomInfoListItem.cc
@@ -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)