From f4259642b88bfcfbcb423fc09ab3e339a8ad8074 Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Thu, 19 May 2022 15:05:50 +0200 Subject: [PATCH] fix date sort on utxos table --- .../java/com/sparrowwallet/sparrow/control/UtxosTreeTable.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/sparrowwallet/sparrow/control/UtxosTreeTable.java b/src/main/java/com/sparrowwallet/sparrow/control/UtxosTreeTable.java index b4007216..f934de65 100644 --- a/src/main/java/com/sparrowwallet/sparrow/control/UtxosTreeTable.java +++ b/src/main/java/com/sparrowwallet/sparrow/control/UtxosTreeTable.java @@ -4,6 +4,7 @@ import com.sparrowwallet.drongo.wallet.WalletNode; import com.sparrowwallet.sparrow.wallet.*; import javafx.beans.property.ReadOnlyObjectWrapper; import javafx.scene.control.SelectionMode; +import javafx.scene.control.TableColumnBase; import javafx.scene.control.TreeTableColumn; import javafx.scene.control.TreeTableView; @@ -24,7 +25,7 @@ public class UtxosTreeTable extends CoinTreeTable { }); dateCol.setCellFactory(p -> new DateCell()); dateCol.setSortable(true); - dateCol.setComparator((o1, o2) -> (int) (o2.getValue() - o1.getValue())); + dateCol.setComparator(TableColumnBase.DEFAULT_COMPARATOR.reversed()); getColumns().add(dateCol); TreeTableColumn outputCol = new TreeTableColumn<>("Output");