qml: correctly update channel list after channel backup import, and correctly delete channel backup
This commit is contained in:
@@ -199,7 +199,10 @@ class QEChannelDetails(QObject, QtEventListener):
|
|||||||
|
|
||||||
@pyqtSlot()
|
@pyqtSlot()
|
||||||
def deleteChannel(self):
|
def deleteChannel(self):
|
||||||
self._wallet.wallet.lnworker.remove_channel(self._channel.channel_id)
|
if self.isBackup:
|
||||||
|
self._wallet.wallet.lnworker.remove_channel_backup(self._channel.channel_id)
|
||||||
|
else:
|
||||||
|
self._wallet.wallet.lnworker.remove_channel(self._channel.channel_id)
|
||||||
|
|
||||||
@pyqtSlot(result=str)
|
@pyqtSlot(result=str)
|
||||||
def channelBackup(self):
|
def channelBackup(self):
|
||||||
|
|||||||
@@ -41,6 +41,11 @@ class QEChannelListModel(QAbstractListModel, QtEventListener):
|
|||||||
if wallet == self.wallet:
|
if wallet == self.wallet:
|
||||||
self.on_channel_updated(channel)
|
self.on_channel_updated(channel)
|
||||||
|
|
||||||
|
@qt_event_listener
|
||||||
|
def on_event_channels_updated(self, wallet):
|
||||||
|
if wallet == self.wallet:
|
||||||
|
self.init_model()
|
||||||
|
|
||||||
def on_destroy(self):
|
def on_destroy(self):
|
||||||
self.unregister_callbacks()
|
self.unregister_callbacks()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user