mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 20:48:52 +03:00
Fix tags and world buttons leaking as communities leaking over the network
This commit is contained in:
parent
371e5a2991
commit
0afc55626a
1 changed files with 10 additions and 4 deletions
|
@ -130,6 +130,16 @@ CommunitiesList::addCommunity(const std::string &group_id)
|
||||||
communities_.emplace(id, QSharedPointer<CommunitiesListItem>(list_item));
|
communities_.emplace(id, QSharedPointer<CommunitiesListItem>(list_item));
|
||||||
contentsLayout_->insertWidget(contentsLayout_->count() - 1, 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,
|
connect(this,
|
||||||
&CommunitiesList::groupProfileRetrieved,
|
&CommunitiesList::groupProfileRetrieved,
|
||||||
this,
|
this,
|
||||||
|
@ -152,10 +162,6 @@ CommunitiesList::addCommunity(const std::string &group_id)
|
||||||
|
|
||||||
communities_.at(id)->setRooms(rooms);
|
communities_.at(id)->setRooms(rooms);
|
||||||
});
|
});
|
||||||
connect(list_item,
|
|
||||||
&CommunitiesListItem::clicked,
|
|
||||||
this,
|
|
||||||
&CommunitiesList::highlightSelectedCommunity);
|
|
||||||
|
|
||||||
http::client()->group_profile(
|
http::client()->group_profile(
|
||||||
group_id, [id, this](const mtx::responses::GroupProfile &res, mtx::http::RequestErr err) {
|
group_id, [id, this](const mtx::responses::GroupProfile &res, mtx::http::RequestErr err) {
|
||||||
|
|
Loading…
Reference in a new issue