fix(chatgui): remove duplicate loadChannels after JoinDialog close, remove 800ms delay
- showJoinDialog: don't call loadChannels after dialog close — channel already in model via CHANNEL_UPDATED event, online badge via CHANNEL_PEERS_ONLINE. Duplicate loadChannels was resetting the peer online count. - onConnectResult: remove 800ms QTimer — dialog closes immediately. Channel data arrives independently through the event pipeline.
This commit is contained in:
1 parent
51631319cd
commit
0ee676b731
2 files changed
+5
-8
No files matched your search
@@ -195,12 +195,10 @@ void JoinDialog::onConnectResult(uint64_t nodeId, uint64_t channelId, int result
|
||||
if (!m_connecting || nodeId != m_pendingNodeId) return;
|
||||
|
||||
if (result == 0) {
|
||||
setStatus("Connected! Waiting for channel data...");
|
||||
QTimer::singleShot(800, this, [this] {
|
||||
QString cid = QString::number(m_pendingChannelId);
|
||||
emit joined(cid);
|
||||
accept();
|
||||
});
|
||||
setStatus("Connected!");
|
||||
QString cid = QString::number(m_pendingChannelId);
|
||||
emit joined(cid);
|
||||
accept();
|
||||
} else {
|
||||
m_connecting = false;
|
||||
m_connectBtn->setEnabled(true);
|
||||
|
||||
@@ -267,8 +267,7 @@ void MainWindow::showJoinDialog() {
|
||||
}
|
||||
|
||||
JoinDialog dlg(m_node, m_db, this, autoLink);
|
||||
if (dlg.exec() == QDialog::Accepted)
|
||||
m_channelList->loadChannels();
|
||||
dlg.exec();
|
||||
}
|
||||
|
||||
void MainWindow::showSettings() {
|
||||
|
||||
Reference in new issue
Block a user