From fd3f0e6d2570c5a5a7461dfc1a204ad77958b4b5 Mon Sep 17 00:00:00 2001 From: Christoph Atteneder Date: Mon, 1 Feb 2021 10:52:06 +0100 Subject: [PATCH] Minor cleanup --- .../pendingtrades/PendingTradesView.java | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/PendingTradesView.java b/desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/PendingTradesView.java index c2dfcea6c6..0e82a2bd1e 100644 --- a/desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/PendingTradesView.java +++ b/desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/PendingTradesView.java @@ -126,16 +126,16 @@ public class PendingTradesView extends ActivatableViewAndModel tradesListChangeListener; - private Map newChatMessagesByTradeMap = new HashMap<>(); + private final Map newChatMessagesByTradeMap = new HashMap<>(); private String tradeIdOfOpenChat; private double chatPopupStageXPosition = -1; private double chatPopupStageYPosition = -1; private ChangeListener xPositionListener; private ChangeListener yPositionListener; - private Map buttonByTrade = new HashMap<>(); - private Map badgeByTrade = new HashMap<>(); - private Map> listenerByTrade = new HashMap<>(); + private final Map buttonByTrade = new HashMap<>(); + private final Map badgeByTrade = new HashMap<>(); + private final Map> listenerByTrade = new HashMap<>(); private ChangeListener tradeStateListener; private ChangeListener disputeStateListener; private ChangeListener mediationResultStateListener; @@ -536,9 +536,7 @@ public class PendingTradesView extends ActivatableViewAndModel { - tableView.getSelectionModel().select(index); - }); + UserThread.execute(() -> tableView.getSelectionModel().select(index)); } } @@ -864,7 +862,7 @@ public class PendingTradesView extends ActivatableViewAndModel setRemoveTradeColumnCellFactory() { + private void setRemoveTradeColumnCellFactory() { moveTradeToFailedColumn.setCellValueFactory((trade) -> new ReadOnlyObjectWrapper<>(trade.getValue())); moveTradeToFailedColumn.setCellFactory( new Callback<>() { @@ -937,6 +935,5 @@ public class PendingTradesView extends ActivatableViewAndModel