Merge pull request #6192 from jmacxx/fix_issue_6191

Transactions view: fix NPE in column sorting when Memo is empty
This commit is contained in:
Christoph Atteneder 2022-05-08 21:54:51 +02:00 committed by GitHub
commit c141f85a8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -207,7 +207,7 @@ public class TransactionsView extends ActivatableView<VBox, Void> {
transactionColumn.setComparator(Comparator.comparing(TransactionsListItem::getTxId));
amountColumn.setComparator(Comparator.comparing(TransactionsListItem::getAmountAsCoin));
confidenceColumn.setComparator(Comparator.comparingDouble(item -> item.getTxConfidenceIndicator().getProgress()));
memoColumn.setComparator(Comparator.comparing(TransactionsListItem::getMemo));
memoColumn.setComparator(Comparator.comparing(o -> o.getMemo() != null ? o.getMemo() : ""));
dateColumn.setSortType(TableColumn.SortType.DESCENDING);
tableView.getSortOrder().add(dateColumn);