chat: автоподключение к узлам группы (вкл/выкл) + ручной connect к узлу (desktop+android); фикс reinit при QR-join
This commit is contained in:
1 parent
9ef501a2fb
commit
d7bb58c6fb
20 files changed
+241
-5
No files matched your search
@@ -458,11 +458,23 @@ void AccountList::onMemberContextMenu(const QPoint& pos) {
|
||||
QString name = m_model->data(index, Qt::DisplayRole).toString();
|
||||
|
||||
QMenu menu(m_listView);
|
||||
QAction* connectAction = menu.addAction("Connect");
|
||||
if (nodeId == m_db->myNodeId()) connectAction->setEnabled(false);
|
||||
QAction* renameAction = menu.addAction("Rename");
|
||||
if (nodeId == m_db->myNodeId()) renameAction->setEnabled(false);
|
||||
QAction* editAction = menu.addAction("Edit");
|
||||
QAction* chosen = menu.exec(m_listView->viewport()->mapToGlobal(pos));
|
||||
|
||||
if (chosen == connectAction) {
|
||||
struct chat_connect_node_req* r = (struct chat_connect_node_req*)u_malloc(sizeof(*r));
|
||||
if (!r) return;
|
||||
memset(r, 0, sizeof(*r));
|
||||
strncpy(r->ch_id, m_channelId.toUtf8().constData(), sizeof(r->ch_id) - 1);
|
||||
r->node_id = nodeId;
|
||||
gui_bridge_post_uasync_fn(chat_core_connect_node_trampoline, r);
|
||||
return;
|
||||
}
|
||||
|
||||
if (chosen == renameAction) {
|
||||
RenameDialog dlg(m_db, m_channelId, nodeId, name, this);
|
||||
if (dlg.exec() == QDialog::Accepted) {
|
||||
|
||||
Reference in new issue
Block a user