Filter desktop invitation targets by local membership
This commit is contained in:
1 parent
55d9e79983
commit
ef62a80eb8
2 files changed
+4
-2
No files matched your search
@@ -23,7 +23,9 @@ DmInviteDialog::DmInviteDialog(DbManager* db, quint64 peer, const QString& name,
|
||||
auto* layout = new QVBoxLayout(this);
|
||||
layout->addWidget(new QLabel(QStringLiteral("Получатель: %1").arg(name), this));
|
||||
m_groups = new QComboBox(this);
|
||||
for (const auto& group : db->getChannels()) m_groups->addItem(group.name, group.channelId);
|
||||
for (const auto& group : db->getChannels()) {
|
||||
if (db->isChannelMember(group.channelId, db->myNodeId())) m_groups->addItem(group.name, group.channelId);
|
||||
}
|
||||
m_groups->setCurrentIndex(-1);
|
||||
m_groups->setPlaceholderText(QStringLiteral("Выберите группу"));
|
||||
layout->addWidget(m_groups);
|
||||
|
||||
Reference in new issue
Block a user