diff --git a/desktop/src/main/java/bisq/desktop/main/portfolio/openoffer/OpenOffersView.java b/desktop/src/main/java/bisq/desktop/main/portfolio/openoffer/OpenOffersView.java index 2e14635ceb..7971f1e781 100644 --- a/desktop/src/main/java/bisq/desktop/main/portfolio/openoffer/OpenOffersView.java +++ b/desktop/src/main/java/bisq/desktop/main/portfolio/openoffer/OpenOffersView.java @@ -122,7 +122,9 @@ public class OpenOffersView extends ActivatableViewAndModel widthListener; @Inject - public OpenOffersView(OpenOffersViewModel model, Navigation navigation, OfferDetailsWindow offerDetailsWindow) { + public OpenOffersView(OpenOffersViewModel model, + Navigation navigation, + OfferDetailsWindow offerDetailsWindow) { super(model); this.navigation = navigation; this.offerDetailsWindow = offerDetailsWindow; @@ -187,7 +189,8 @@ public class OpenOffersView extends ActivatableViewAndModel { try { OfferPayload offerPayload = row.getItem().getOffer().getOfferPayload(); - navigation.navigateToWithData(offerPayload, MainView.class, PortfolioView.class, DuplicateOfferView.class); + navigation.navigateToWithData(offerPayload, MainView.class, PortfolioView.class, + DuplicateOfferView.class); } catch (NullPointerException e) { log.warn("Unable to get offerPayload - {}", e.toString()); } @@ -347,7 +350,8 @@ public class OpenOffersView extends ActivatableViewAndModel offerDetailsWindow.show(item.getOffer())); @@ -472,7 +475,7 @@ public class OpenOffersView extends ActivatableViewAndModel onEditOpenOffer(item.getOpenOffer())); setGraphic(button); } - button.setOnAction(event -> onEditOpenOffer(item.getOpenOffer())); } else { setGraphic(null); if (button != null) { diff --git a/desktop/src/main/java/bisq/desktop/main/portfolio/openoffer/OpenOffersViewModel.java b/desktop/src/main/java/bisq/desktop/main/portfolio/openoffer/OpenOffersViewModel.java index 9a2e12b7d1..7dbc5be252 100644 --- a/desktop/src/main/java/bisq/desktop/main/portfolio/openoffer/OpenOffersViewModel.java +++ b/desktop/src/main/java/bisq/desktop/main/portfolio/openoffer/OpenOffersViewModel.java @@ -160,8 +160,14 @@ class OpenOffersViewModel extends ActivatableWithDataModel return DisplayUtils.formatDateTime(item.getOffer().getDate()); } + boolean isNotPublished(OpenOfferListItem item) { + return isDeactivated(item); + } + boolean isDeactivated(OpenOfferListItem item) { - return item != null && item.getOpenOffer() != null && item.getOpenOffer().isDeactivated(); + return item != null && + item.getOpenOffer() != null && + item.getOpenOffer().isDeactivated(); } boolean isBootstrappedOrShowPopup() {