Fix tags and world buttons leaking as communities leaking over the network

This commit is contained in:
Nicolas Werner 2020-11-18 13:29:28 +01:00
parent 371e5a2991
commit 0afc55626a

View file

@ -130,6 +130,16 @@ CommunitiesList::addCommunity(const std::string &group_id)
communities_.emplace(id, QSharedPointer<CommunitiesListItem>(list_item));
contentsLayout_->insertWidget(contentsLayout_->count() - 1, list_item);
connect(list_item,
&CommunitiesListItem::clicked,
this,
&CommunitiesList::highlightSelectedCommunity);
if (group_id.empty() || group_id.front() != '+')
return;
nhlog::ui()->debug("Add community: {}", group_id);
connect(this,
&CommunitiesList::groupProfileRetrieved,
this,
@ -152,10 +162,6 @@ CommunitiesList::addCommunity(const std::string &group_id)
communities_.at(id)->setRooms(rooms);
});
connect(list_item,
&CommunitiesListItem::clicked,
this,
&CommunitiesList::highlightSelectedCommunity);
http::client()->group_profile(
group_id, [id, this](const mtx::responses::GroupProfile &res, mtx::http::RequestErr err) {