From 0cd9e3b1e56e991dd357ff4e98c4aba108c25e3f Mon Sep 17 00:00:00 2001 From: Konstantinos Sideris Date: Fri, 26 May 2017 21:34:16 +0300 Subject: Resolve name and avatar on 1-on-1 rooms --- src/RoomList.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/RoomList.cc') diff --git a/src/RoomList.cc b/src/RoomList.cc index 3e381340..6d0e185b 100644 --- a/src/RoomList.cc +++ b/src/RoomList.cc @@ -100,8 +100,8 @@ void RoomList::setInitialRooms(const QMap &states) auto room_id = it.key(); auto state = it.value(); - if (!state.avatar.content().url().toString().isEmpty()) - client_->fetchRoomAvatar(room_id, state.avatar.content().url()); + if (!state.getAvatar().toString().isEmpty()) + client_->fetchRoomAvatar(room_id, state.getAvatar()); RoomInfoListItem *room_item = new RoomInfoListItem(state, room_id, scrollArea_); connect(room_item, &RoomInfoListItem::clicked, this, &RoomList::highlightSelectedRoom); @@ -133,8 +133,8 @@ void RoomList::sync(const QMap &states) auto room = rooms_[room_id]; - auto current_avatar = room->state().avatar.content().url(); - auto new_avatar = state.avatar.content().url(); + auto current_avatar = room->state().getAvatar(); + auto new_avatar = state.getAvatar(); if (current_avatar != new_avatar && !new_avatar.toString().isEmpty()) client_->fetchRoomAvatar(room_id, new_avatar); -- cgit 1.5.1