diff options
author | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2017-05-26 21:34:16 +0300 |
---|---|---|
committer | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2017-05-26 21:34:16 +0300 |
commit | 0cd9e3b1e56e991dd357ff4e98c4aba108c25e3f (patch) | |
tree | 7ae3eb41869da32eea14791981b18e80eeedfc68 /src/RoomList.cc | |
parent | Add custom scrollbar on the timeline (diff) | |
download | nheko-0cd9e3b1e56e991dd357ff4e98c4aba108c25e3f.tar.xz |
Resolve name and avatar on 1-on-1 rooms
Diffstat (limited to 'src/RoomList.cc')
-rw-r--r-- | src/RoomList.cc | 8 |
1 files changed, 4 insertions, 4 deletions
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<QString, RoomState> &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<QString, RoomState> &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); |