[bisq-network/bisq] Sorting order of offers appropriately by min/max range (#4068)
Christoph Atteneder
notifications at github.com
Tue Mar 17 15:41:45 UTC 2020
ripcurlx commented on this pull request.
> + amountColumn.sortTypeProperty().addListener((observable, oldValue, newValue) -> {
+ if (newValue==TableColumn.SortType.DESCENDING)
+ amountColumn.setComparator(Comparator.comparing(o -> o.getOffer().getAmount(), Comparator.nullsFirst(Comparator.naturalOrder())));
+ else
+ amountColumn.setComparator(Comparator.comparing(o -> o.getOffer().getMinAmount(), Comparator.nullsFirst(Comparator.naturalOrder())));
+ });
+ volumeColumn.sortTypeProperty().addListener((observable, oldValue, newValue) -> {
+ if (newValue==TableColumn.SortType.DESCENDING)
+ volumeColumn.setComparator(Comparator.comparing(o -> o.getOffer().getVolume(), Comparator.nullsFirst(Comparator.naturalOrder())));
+ else
+ volumeColumn.setComparator(Comparator.comparing(o -> o.getOffer().getMinVolume(), Comparator.nullsFirst(Comparator.naturalOrder())));
+ });
I'll have a look why Codacy is not checking for this.
--
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/4068#discussion_r393773940
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20200317/6399d5d1/attachment.html>
More information about the bisq-github
mailing list