Skip to content

Commit

Permalink
Merge pull request #3796 from ripcurlx/fix-rendering-issue-of-disputes
Browse files Browse the repository at this point in the history
Remove listener before setting a new one
  • Loading branch information
sqrrm authored Dec 16, 2019
2 parents 3e378b9 + c8848e1 commit 737a419
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 737a419

Please sign in to comment.