Reformat, add bracket

This commit is contained in:
Manfred Karrer 2018-01-09 22:08:33 +01:00
parent ac65414418
commit e6d55591a6
No known key found for this signature in database
GPG Key ID: 401250966A6B2C46
2 changed files with 7 additions and 4 deletions

View File

@ -10,7 +10,7 @@ public class DevEnv {
// peer (click user icon and alt+r), filter/block offers by various data like offer ID (cmd + f).
// The user can set a program argument to ignore all of those privileged network_messages. They are intended for
// emergency cases only (beside update message and arbitrator registration).
public static final boolean USE_DEV_PRIVILEGE_KEYS = false;
public static final boolean USE_DEV_PRIVILEGE_KEYS = true;
public static final String DEV_PRIVILEGE_PUB_KEY = "027a381b5333a56e1cc3d90d3a7d07f26509adf7029ed06fc997c656621f8da1ee";
public static final String DEV_PRIVILEGE_PRIV_KEY = "6ac43ea1df2a290c1c8391736aa42e4339c5cb4f110ff0257a13b63211977b7a";
@ -18,7 +18,7 @@ public class DevEnv {
// If set to true we ignore several UI behavior like confirmation popups as well dummy accounts are created and
// offers are filled with default values. Intended to make dev testing faster.
@SuppressWarnings("PointlessBooleanExpression")
public static final boolean DEV_MODE = STRESS_TEST_MODE || false;
public static final boolean DEV_MODE = STRESS_TEST_MODE || true;
public static final boolean DAO_PHASE2_ACTIVATED = false;
public static final boolean DAO_TRADING_ACTIVATED = false;

View File

@ -420,8 +420,11 @@ 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 isPreferredCurrency = getTradeCurrencies().stream()
.filter(c -> c.getCode().equals(offer.getCurrencyCode()))
.findAny()
.isPresent();
boolean currencyResult = (showAllTradeCurrenciesProperty.get() && isPreferredCurrency) ||
offer.getCurrencyCode().equals(selectedTradeCurrency.getCode());
boolean paymentMethodResult = showAllPaymentMethods ||
offer.getPaymentMethod().equals(selectedPaymentMethod);