|
|
|
|
@ -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); |
|
|
|
|
|