ui: avoid restart messages when changing node options
Some checks failed
Build status / Build (push) Has been cancelled

When saving the preferences, we check if the user changed the address of
the node. Usually the current node address is the same than the one
loaded, but some gRPC versions does not report it, so we use
"unix:/local" as the address of the node.

As this address is different than the one configured, we were displaying
unnecessary restart messages to the users.
This commit is contained in:
Gustavo Iñiguez Goia 2025-02-19 00:04:39 +01:00
parent 5fdb60dccb
commit 8c1da76dff
Failed to generate hash of commit

View file

@ -929,7 +929,9 @@ class PreferencesDialog(QtWidgets.QDialog, uic.loadUiType(DIALOG_UI_PATH)[0]):
return error
# exclude this message if there're more than one node connected
if self.comboNodes.currentText() != self.comboNodeAddress.currentText() or \
# XXX: unix:/local is a special name for the node, when the gRPC
# does not return the correct address of the node.
if (self.comboNodes.currentText() != "unix:/local" and self.comboNodes.currentText() != self.comboNodeAddress.currentText()) or \
self.comboServerAddr.currentText() != self.comboNodeAddress.currentText():
self._changes_needs_restart = QC.translate("preferences", "Node address changed (update GUI address if needed)")