diff --git a/electrum/gui/qml/components/controls/ChannelDelegate.qml b/electrum/gui/qml/components/controls/ChannelDelegate.qml index 345a2f35c..54b8a05a2 100644 --- a/electrum/gui/qml/components/controls/ChannelDelegate.qml +++ b/electrum/gui/qml/components/controls/ChannelDelegate.qml @@ -37,7 +37,9 @@ ItemDelegate { Image { id: walleticon source: model.is_backup - ? '../../../icons/nocloud.png' + ? model.is_imported + ? '../../../icons/nocloud.png' + : '../../../icons/lightning_disconnected.png' : model.is_trampoline ? '../../../icons/kangaroo.png' : '../../../icons/lightning.png' diff --git a/electrum/gui/qml/qechannellistmodel.py b/electrum/gui/qml/qechannellistmodel.py index 8c612d2f0..2f4c4c8f7 100644 --- a/electrum/gui/qml/qechannellistmodel.py +++ b/electrum/gui/qml/qechannellistmodel.py @@ -17,7 +17,7 @@ class QEChannelListModel(QAbstractListModel, QtEventListener): _ROLE_NAMES=('cid','state','state_code','initiator','capacity','can_send', 'can_receive','l_csv_delay','r_csv_delay','send_frozen','receive_frozen', 'type','node_id','node_alias','short_cid','funding_tx','is_trampoline', - 'is_backup') + 'is_backup', 'is_imported') _ROLE_KEYS = range(Qt.UserRole, Qt.UserRole + len(_ROLE_NAMES)) _ROLE_MAP = dict(zip(_ROLE_KEYS, [bytearray(x.encode()) for x in _ROLE_NAMES])) _ROLE_RMAP = dict(zip(_ROLE_NAMES, _ROLE_KEYS)) @@ -86,9 +86,11 @@ class QEChannelListModel(QAbstractListModel, QtEventListener): if lnc.is_backup(): item['can_send'] = QEAmount() item['can_receive'] = QEAmount() + item['is_imported'] = lnc.is_imported else: item['can_send'] = QEAmount(amount_msat=lnc.available_to_spend(LOCAL)) item['can_receive'] = QEAmount(amount_msat=lnc.available_to_spend(REMOTE)) + item['is_imported'] = False return item numOpenChannelsChanged = pyqtSignal()