From 7644c84e07e03a1d7a92f2f28a6f8366b91c5696 Mon Sep 17 00:00:00 2001 From: SomberNight Date: Tue, 26 Feb 2019 17:30:53 +0100 Subject: [PATCH] qt: update whole gui on every LN payment inefficient... but at least kept updated. --- electrum/gui/qt/main_window.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/electrum/gui/qt/main_window.py b/electrum/gui/qt/main_window.py index 458028e98..bfe3f66d2 100644 --- a/electrum/gui/qt/main_window.py +++ b/electrum/gui/qt/main_window.py @@ -224,7 +224,8 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger): interests = ['wallet_updated', 'network_updated', 'blockchain_updated', 'new_transaction', 'status', 'banner', 'verified', 'fee', 'fee_histogram', 'on_quotes', - 'on_history', 'channel', 'channels', 'ln_status', 'ln_message'] + 'on_history', 'channel', 'channels', 'ln_status', 'ln_message', + 'ln_payment_completed'] # To avoid leaking references to "self" that prevent the # window from being GC-ed when closed, callbacks should be # methods of this class only, and specifically not be @@ -375,6 +376,11 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger): self.update_status() elif event == 'ln_status': self.need_update_ln.set() + elif event == 'ln_payment_completed': + # FIXME it is really inefficient to force update the whole GUI + # just for a single LN payment. individual rows in lists should be updated instead. + # consider: history tab, invoice list, request list + self.need_update.set() else: self.logger.info(f"unexpected network message: {event} {args}")