Minor cleanup

This commit is contained in:
Christoph Atteneder 2021-02-01 10:52:06 +01:00
parent 7c81e1e47b
commit fd3f0e6d25
No known key found for this signature in database
GPG Key ID: CD5DC1C529CDFD3B

View File

@ -126,16 +126,16 @@ public class PendingTradesView extends ActivatableViewAndModel<VBox, PendingTrad
private Subscription selectedItemSubscription;
private Stage chatPopupStage;
private ListChangeListener<PendingTradesListItem> tradesListChangeListener;
private Map<String, Long> newChatMessagesByTradeMap = new HashMap<>();
private final Map<String, Long> newChatMessagesByTradeMap = new HashMap<>();
private String tradeIdOfOpenChat;
private double chatPopupStageXPosition = -1;
private double chatPopupStageYPosition = -1;
private ChangeListener<Number> xPositionListener;
private ChangeListener<Number> yPositionListener;
private Map<String, Button> buttonByTrade = new HashMap<>();
private Map<String, JFXBadge> badgeByTrade = new HashMap<>();
private Map<String, ListChangeListener<ChatMessage>> listenerByTrade = new HashMap<>();
private final Map<String, Button> buttonByTrade = new HashMap<>();
private final Map<String, JFXBadge> badgeByTrade = new HashMap<>();
private final Map<String, ListChangeListener<ChatMessage>> listenerByTrade = new HashMap<>();
private ChangeListener<Trade.State> tradeStateListener;
private ChangeListener<Trade.DisputeState> disputeStateListener;
private ChangeListener<MediationResultState> mediationResultStateListener;
@ -536,9 +536,7 @@ public class PendingTradesView extends ActivatableViewAndModel<VBox, PendingTrad
if (selectedItemFromModel != null) {
// Select and focus selectedItem from model
int index = tableView.getItems().indexOf(selectedItemFromModel);
UserThread.execute(() -> {
tableView.getSelectionModel().select(index);
});
UserThread.execute(() -> tableView.getSelectionModel().select(index));
}
}
@ -864,7 +862,7 @@ public class PendingTradesView extends ActivatableViewAndModel<VBox, PendingTrad
return chatColumn;
}
private TableColumn<PendingTradesListItem, PendingTradesListItem> setRemoveTradeColumnCellFactory() {
private void setRemoveTradeColumnCellFactory() {
moveTradeToFailedColumn.setCellValueFactory((trade) -> new ReadOnlyObjectWrapper<>(trade.getValue()));
moveTradeToFailedColumn.setCellFactory(
new Callback<>() {
@ -937,6 +935,5 @@ public class PendingTradesView extends ActivatableViewAndModel<VBox, PendingTrad
};
}
});
return moveTradeToFailedColumn;
}
}