[bisq-network/bisq] [v1.5.5] Improve pending trades list rendering (#5145)

sqrrm notifications at github.com
Mon Feb 1 11:21:12 CET 2021


@sqrrm commented on this pull request.



>                                      }
                                 }
                             }
 
                             private void update() {
                                 HyperlinkWithIcon field;
-                                if (isMaybeInvalidTrade(trade)) {
-                                    field = new HyperlinkWithIcon(trade.getShortId());
-                                    field.setIcon(FormBuilder.getMediumSizeIcon(MaterialDesignIcon.ALERT_CIRCLE_OUTLINE));
-                                    field.setOnAction(event -> tradeDetailsWindow.show(trade));
-                                    field.setTooltip(new Tooltip(Res.get("tooltip.invalidTradeState.warning")));
-                                    if (trade.isTxChainInvalid()) {
-                                        field.getIcon().getStyleClass().addAll("icon", "error-icon");
+                                if (trade != null) {

Prefer return early
`if (trade == null) return;`

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/5145#pullrequestreview-580203000
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20210201/eea87b93/attachment.htm>


More information about the bisq-github mailing list