mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 09:52:23 +01:00
Remove DevEnv.isDaoActivated()
from combined if statements with &&
as isDaoActivated is always true
In case of a `||` the statement gets removed as it always is true. At getUserPaymentAccounts we refactor further the steam to a HashSet constructor operation as the filter method gets removed. Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
This commit is contained in:
parent
e8a9132d30
commit
114bda22cd
@ -41,15 +41,13 @@ import bisq.core.util.coin.CoinFormatter;
|
||||
|
||||
import bisq.network.p2p.P2PService;
|
||||
|
||||
import bisq.common.app.DevEnv;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
|
||||
import javax.inject.Named;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* Domain for that UI element.
|
||||
@ -91,8 +89,6 @@ class CreateOfferDataModel extends MutableOfferDataModel {
|
||||
|
||||
@Override
|
||||
protected Set<PaymentAccount> getUserPaymentAccounts() {
|
||||
return Objects.requireNonNull(user.getPaymentAccounts()).stream()
|
||||
.filter(account -> !account.getPaymentMethod().isBsqSwap() || DevEnv.isDaoActivated())
|
||||
.collect(Collectors.toSet());
|
||||
return new HashSet<>(Objects.requireNonNull(user.getPaymentAccounts()));
|
||||
}
|
||||
}
|
||||
|
@ -12,8 +12,6 @@ import bisq.core.dao.state.model.blockchain.Block;
|
||||
import bisq.core.locale.Res;
|
||||
import bisq.core.user.Preferences;
|
||||
|
||||
import bisq.common.app.DevEnv;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
|
||||
@ -64,7 +62,7 @@ public class DaoPresentation implements DaoStateListener {
|
||||
this.daoStateService = daoStateService;
|
||||
|
||||
preferences.getDontShowAgainMapAsObservable().addListener((MapChangeListener<? super String, ? super Boolean>) change -> {
|
||||
if (change.getKey().equals(DAO_NEWS) && DevEnv.isDaoActivated()) {
|
||||
if (change.getKey().equals(DAO_NEWS)) {
|
||||
// devs enable this when a news badge is required
|
||||
// showNotification.set(!change.wasAdded());
|
||||
showNotification.set(false);
|
||||
|
@ -1047,7 +1047,7 @@ public class PreferencesView extends ActivatableViewAndModel<GridPane, Preferenc
|
||||
}
|
||||
|
||||
private void activateDaoPreferences() {
|
||||
daoActivatedToggleButton.setSelected(DevEnv.isDaoActivated());
|
||||
daoActivatedToggleButton.setSelected(true);
|
||||
daoActivatedToggleButton.setOnAction(e -> {
|
||||
// We do not use preferences as we need to handle the value at startup before preferences are loaded,
|
||||
// so we write the option to the properties file. If the program argument is set it has higher priority
|
||||
|
Loading…
Reference in New Issue
Block a user