Fix avatar not being set for some rooms in the top bar
This commit is contained in:
parent
b25e481418
commit
7df6529310
@ -717,11 +717,8 @@ ChatPage::changeTopRoomInfo(const QString &room_id)
|
|||||||
top_bar_->updateRoomName(name);
|
top_bar_->updateRoomName(name);
|
||||||
top_bar_->updateRoomTopic(QString::fromStdString(room_info[room_id].topic));
|
top_bar_->updateRoomTopic(QString::fromStdString(room_info[room_id].topic));
|
||||||
|
|
||||||
auto img = cache::getRoomAvatar(room_id);
|
|
||||||
|
|
||||||
if (img.isNull())
|
|
||||||
top_bar_->updateRoomAvatarFromName(name);
|
top_bar_->updateRoomAvatarFromName(name);
|
||||||
else
|
if (!avatar_url.isEmpty())
|
||||||
top_bar_->updateRoomAvatar(avatar_url);
|
top_bar_->updateRoomAvatar(avatar_url);
|
||||||
|
|
||||||
} catch (const lmdb::error &e) {
|
} catch (const lmdb::error &e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user