gui update db and connection
This commit is contained in:
1 parent
19a4505a03
commit
9dafb4c31e
13 files changed
+203
-5
No files matched your search
@@ -3,6 +3,7 @@
|
||||
#include "messagelist.h"
|
||||
#include "accountlist.h"
|
||||
#include "invitedialog.h"
|
||||
#include "joindialog.h"
|
||||
#include "invite_link.h"
|
||||
#include "../db/db_manager.h"
|
||||
#include "../transport/utun_node.h"
|
||||
@@ -42,6 +43,8 @@ MainWindow::MainWindow(QWidget *parent, DbManager* db)
|
||||
|
||||
connect(m_channelList, &ChannelList::inviteRequested,
|
||||
this, &MainWindow::showInviteDialog);
|
||||
connect(m_channelList, &ChannelList::joinRequested,
|
||||
this, &MainWindow::showJoinDialog);
|
||||
|
||||
m_channelList->loadChannels();
|
||||
m_accountList->loadAccounts();
|
||||
@@ -179,3 +182,14 @@ void MainWindow::showInviteDialog(const QString& channelId) {
|
||||
InviteDialog dlg(link, this);
|
||||
dlg.exec();
|
||||
}
|
||||
|
||||
void MainWindow::showJoinDialog() {
|
||||
if (!m_node || !m_node->isRunning()) {
|
||||
QMessageBox::warning(this, "Error", "Node is not running.");
|
||||
return;
|
||||
}
|
||||
JoinDialog dlg(m_node, m_db, this);
|
||||
if (dlg.exec() == QDialog::Accepted) {
|
||||
m_channelList->loadChannels();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user