mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-23 17:47:31 +00:00
Show description (label) in TxDialog screen when opened from History (#4775)
This commit is contained in:
parent
e1c66488b1
commit
75e30ddc9d
1 changed files with 9 additions and 5 deletions
|
@ -297,10 +297,14 @@ class HistoryList(MyTreeWidget, AcceptFileDragDrop):
|
||||||
super(HistoryList, self).on_doubleclick(item, column)
|
super(HistoryList, self).on_doubleclick(item, column)
|
||||||
else:
|
else:
|
||||||
tx_hash = item.data(0, Qt.UserRole)
|
tx_hash = item.data(0, Qt.UserRole)
|
||||||
|
self.show_transaction(tx_hash)
|
||||||
|
|
||||||
|
def show_transaction(self, tx_hash):
|
||||||
tx = self.wallet.transactions.get(tx_hash)
|
tx = self.wallet.transactions.get(tx_hash)
|
||||||
if not tx:
|
if not tx:
|
||||||
return
|
return
|
||||||
self.parent.show_transaction(tx)
|
label = self.wallet.get_label(tx_hash) or None # prefer 'None' if not defined (force tx dialog to hide Description field if missing)
|
||||||
|
self.parent.show_transaction(tx, label)
|
||||||
|
|
||||||
def update_labels(self):
|
def update_labels(self):
|
||||||
root = self.invisibleRootItem()
|
root = self.invisibleRootItem()
|
||||||
|
@ -354,7 +358,7 @@ class HistoryList(MyTreeWidget, AcceptFileDragDrop):
|
||||||
for c in self.editable_columns:
|
for c in self.editable_columns:
|
||||||
menu.addAction(_("Edit {}").format(self.headerItem().text(c)),
|
menu.addAction(_("Edit {}").format(self.headerItem().text(c)),
|
||||||
lambda bound_c=c: self.editItem(item, bound_c))
|
lambda bound_c=c: self.editItem(item, bound_c))
|
||||||
menu.addAction(_("Details"), lambda: self.parent.show_transaction(tx))
|
menu.addAction(_("Details"), lambda: self.show_transaction(tx_hash))
|
||||||
if is_unconfirmed and tx:
|
if is_unconfirmed and tx:
|
||||||
# note: the current implementation of RBF *needs* the old tx fee
|
# note: the current implementation of RBF *needs* the old tx fee
|
||||||
rbf = is_mine and not tx.is_final() and fee is not None
|
rbf = is_mine and not tx.is_final() and fee is not None
|
||||||
|
|
Loading…
Add table
Reference in a new issue