Skip to content

Commit

Permalink
Remove listener before setting a new one
Browse files Browse the repository at this point in the history
This fixes update issues reported in bisq-network#3731.
  • Loading branch information
ripcurlx committed Dec 16, 2019
1 parent 3e378b9 commit c8848e1
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -892,6 +892,10 @@ public TableCell<Dispute, Dispute> call(TableColumn<Dispute, Dispute> column) {
public void updateItem(final Dispute item, boolean empty) {
super.updateItem(item, empty);
if (item != null && !empty) {
if (closedProperty != null) {
closedProperty.removeListener(listener);
}

listener = (observable, oldValue, newValue) -> {
setText(newValue ? Res.get("support.closed") : Res.get("support.open"));
if (getTableRow() != null)
Expand Down

0 comments on commit c8848e1

Please sign in to comment.