Skip to content

Commit

Permalink
Merge pull request #6679 from napoly/fix_hide_edit_button_bsq_offer
Browse files Browse the repository at this point in the history
Remove edit button for BSQ offers
  • Loading branch information
alejandrogarcia83 committed Jul 1, 2023
2 parents 1cc2b35 + fc42044 commit 3233996
Showing 1 changed file with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1169,13 +1169,18 @@ public void updateItem(final OfferBookListItem item, boolean empty) {
button.setStyle(CssTheme.isDarkTheme() ? "-fx-text-fill: white" : "-fx-text-fill: #444444");
button.setOnAction(e -> onRemoveOpenOffer(offer));

iconView2.setId("image-edit");
button2.updateText(Res.get("shared.edit"));
button2.setId(null);
button2.setStyle(CssTheme.isDarkTheme() ? "-fx-text-fill: white" : "-fx-text-fill: #444444");
button2.setOnAction(e -> onEditOpenOffer(offer));
button2.setManaged(true);
button2.setVisible(true);
if (offer.isBsqSwapOffer()) {
button2.setManaged(false);
button2.setVisible(false);
} else {
iconView2.setId("image-edit");
button2.updateText(Res.get("shared.edit"));
button2.setId(null);
button2.setStyle(CssTheme.isDarkTheme() ? "-fx-text-fill: white" : "-fx-text-fill: #444444");
button2.setOnAction(e -> onEditOpenOffer(offer));
button2.setManaged(true);
button2.setVisible(true);
}
} else {
boolean isSellOffer = OfferViewUtil.isShownAsSellOffer(offer);
iconView.setId(isSellOffer ? "image-buy-white" : "image-sell-white");
Expand Down

0 comments on commit 3233996

Please sign in to comment.