mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-02 18:25:21 +00:00
qt history list: fix sort order of fiat columns
This commit is contained in:
parent
d4d5e32c91
commit
4a7ce238fd
1 changed files with 9 additions and 1 deletions
|
@ -266,7 +266,6 @@ class HistoryList(MyTreeWidget, AcceptFileDragDrop):
|
|||
item = SortableTreeWidgetItem(entry)
|
||||
item.setIcon(0, icon)
|
||||
item.setToolTip(0, str(conf) + " confirmation" + ("s" if conf != 1 else ""))
|
||||
item.setData(0, SortableTreeWidgetItem.DataRole, (status, conf))
|
||||
if has_invoice:
|
||||
item.setIcon(3, self.icon_cache.get(":icons/seal"))
|
||||
for i in range(len(entry)):
|
||||
|
@ -279,6 +278,15 @@ class HistoryList(MyTreeWidget, AcceptFileDragDrop):
|
|||
item.setForeground(4, red_brush)
|
||||
if fiat_value is not None and not tx_item['fiat_default']:
|
||||
item.setForeground(6, blue_brush)
|
||||
# sort orders
|
||||
item.setData(0, SortableTreeWidgetItem.DataRole, (status, conf))
|
||||
item.setData(4, SortableTreeWidgetItem.DataRole, value_sat)
|
||||
item.setData(5, SortableTreeWidgetItem.DataRole, balance)
|
||||
if fiat_value is not None:
|
||||
item.setData(6, SortableTreeWidgetItem.DataRole, fiat_value)
|
||||
if value_sat < 0:
|
||||
item.setData(7, SortableTreeWidgetItem.DataRole, tx_item['acquisition_price'].value)
|
||||
item.setData(8, SortableTreeWidgetItem.DataRole, tx_item['capital_gain'].value)
|
||||
if tx_hash:
|
||||
item.setData(0, self.TX_HASH_ROLE, tx_hash)
|
||||
item.setData(0, self.TX_VALUE_ROLE, value_sat)
|
||||
|
|
Loading…
Add table
Reference in a new issue