Revert isPreferred currencies change in 0.6.3 #1284

This commit is contained in:
Manfred Karrer 2018-01-26 11:30:59 -05:00
parent 4af14af595
commit f108836d1d
No known key found for this signature in database
GPG key ID: 401250966A6B2C46

View file

@ -132,9 +132,7 @@ class OfferBookViewModel extends ActivatableViewModel {
this.navigation = navigation;
this.formatter = formatter;
ObservableList<OfferBookListItem> offerBookListItems = offerBook.getOfferBookListItems();
this.filteredItems = new FilteredList<>(offerBookListItems);
this.filteredItems = new FilteredList<>(offerBook.getOfferBookListItems());
this.sortedItems = new SortedList<>(filteredItems);
tradeCurrencyListChangeListener = c -> {
@ -431,11 +429,7 @@ class OfferBookViewModel extends ActivatableViewModel {
filteredItems.setPredicate(offerBookListItem -> {
Offer offer = offerBookListItem.getOffer();
boolean directionResult = offer.getDirection() != direction;
boolean isPreferredCurrency = getTradeCurrencies().stream()
.filter(c -> c.getCode().equals(offer.getCurrencyCode()))
.findAny()
.isPresent();
boolean currencyResult = (showAllTradeCurrenciesProperty.get() && isPreferredCurrency) ||
boolean currencyResult = (showAllTradeCurrenciesProperty.get()) ||
offer.getCurrencyCode().equals(selectedTradeCurrency.getCode());
boolean paymentMethodResult = showAllPaymentMethods ||
offer.getPaymentMethod().equals(selectedPaymentMethod);