mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-31 01:11:35 +00:00
qt: reflect running gossip in lightning icon
This commit is contained in:
parent
750147d931
commit
1855bcb17d
2 changed files with 6 additions and 2 deletions
BIN
electrum/gui/icons/lightning_disconnected.png
Normal file
BIN
electrum/gui/icons/lightning_disconnected.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.7 KiB |
|
@ -2153,7 +2153,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger):
|
|||
sb.addPermanentWidget(self.seed_button)
|
||||
self.lightning_button = None
|
||||
if self.wallet.has_lightning() and self.network:
|
||||
self.lightning_button = StatusBarButton(read_QIcon("lightning.png"), _("Lightning Network"), self.gui_object.show_lightning_dialog)
|
||||
self.lightning_button = StatusBarButton(read_QIcon("lightning_disconnected.png"), _("Lightning Network"), self.gui_object.show_lightning_dialog)
|
||||
self.update_lightning_icon()
|
||||
sb.addPermanentWidget(self.lightning_button)
|
||||
self.status_button = None
|
||||
|
@ -2193,8 +2193,12 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger):
|
|||
def update_lightning_icon(self):
|
||||
if self.lightning_button is None:
|
||||
return
|
||||
if not self.network.is_lightning_running():
|
||||
if not self.network.lngossip.has_started:
|
||||
return
|
||||
|
||||
# display colorful lightning icon to signal connection
|
||||
self.lightning_button.setIcon(read_QIcon("lightning.png"))
|
||||
|
||||
cur, total = self.network.lngossip.get_sync_progress_estimate()
|
||||
# self.logger.debug(f"updating lngossip sync progress estimate: cur={cur}, total={total}")
|
||||
progress_percent = 0
|
||||
|
|
Loading…
Add table
Reference in a new issue