plugin: nwc: add update timer to connection list

This commit is contained in:
f321x
2026-03-05 10:48:45 +01:00
parent 8ccdc3f7af
commit 9b4d4d61bb
+6 -1
View File
@@ -32,7 +32,7 @@ from PyQt6.QtWidgets import (
QTextEdit, QApplication, QSpinBox, QSizePolicy, QComboBox, QLineEdit,
)
from PyQt6.QtGui import QPixmap, QImage
from PyQt6.QtCore import Qt
from PyQt6.QtCore import Qt, QTimer
from electrum.i18n import _
from electrum.plugin import hook
@@ -197,6 +197,11 @@ class Plugin(NWCServerPlugin):
vbox.addLayout(footer_buttons)
d.setLayout(main_layout)
# update the list from time to time to see if budgets have changed
refresh_timer = QTimer(d)
refresh_timer.timeout.connect(update_connections_list)
refresh_timer.start(5_000) # msec
return bool(d.exec())
def connection_info_input_dialog(self, window) -> Optional[str]: