mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 01:41:11 +01:00
Remove if (!DevEnv.isDaoActivated())
checks as !isDaoActivated is always false
This commit is contained in:
parent
72d97b8d97
commit
3e99a110d7
@ -39,8 +39,6 @@ import bisq.core.dao.governance.votereveal.VoteRevealService;
|
||||
import bisq.core.locale.Res;
|
||||
import bisq.core.user.Preferences;
|
||||
|
||||
import bisq.common.app.DevEnv;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import javafx.fxml.FXML;
|
||||
@ -96,20 +94,7 @@ public class DaoView extends ActivatableView<TabPane, Void> {
|
||||
burnBsqTab.setClosable(false);
|
||||
monitorTab.setClosable(false);
|
||||
|
||||
if (!DevEnv.isDaoActivated()) {
|
||||
factsAndFiguresTab.setDisable(true);
|
||||
bsqWalletTab.setDisable(true);
|
||||
proposalsTab.setDisable(true);
|
||||
bondingTab.setDisable(true);
|
||||
burnBsqTab.setDisable(true);
|
||||
monitorTab.setDisable(true);
|
||||
|
||||
daoNewsTab = new Tab(Res.get("dao.tab.news").toUpperCase());
|
||||
|
||||
root.getTabs().add(daoNewsTab);
|
||||
} else {
|
||||
root.getTabs().addAll(factsAndFiguresTab, bsqWalletTab, proposalsTab, bondingTab, burnBsqTab, monitorTab);
|
||||
}
|
||||
root.getTabs().addAll(factsAndFiguresTab, bsqWalletTab, proposalsTab, bondingTab, burnBsqTab, monitorTab);
|
||||
|
||||
navigationListener = (viewPath, data) -> {
|
||||
if (viewPath.size() == 3 && viewPath.indexOf(DaoView.class) == 1) {
|
||||
|
@ -33,8 +33,6 @@ import bisq.desktop.main.dao.economy.transactions.BSQTransactionsView;
|
||||
|
||||
import bisq.core.locale.Res;
|
||||
|
||||
import bisq.common.app.DevEnv;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import javafx.fxml.FXML;
|
||||
@ -86,12 +84,6 @@ public class EconomyView extends ActivatableView<AnchorPane, Void> {
|
||||
transactions = new MenuItem(navigation, toggleGroup, Res.get("dao.factsAndFigures.menuItem.transactions"), BSQTransactionsView.class, baseNavPath);
|
||||
|
||||
leftVBox.getChildren().addAll(dashboard, supply, transactions);
|
||||
|
||||
if (!DevEnv.isDaoActivated()) {
|
||||
dashboard.setDisable(true);
|
||||
supply.setDisable(true);
|
||||
transactions.setDisable(true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -33,7 +33,6 @@ import bisq.desktop.main.dao.wallet.tx.BsqTxView;
|
||||
|
||||
import bisq.core.locale.Res;
|
||||
|
||||
import bisq.common.app.DevEnv;
|
||||
import bisq.common.util.Tuple2;
|
||||
|
||||
import javax.inject.Inject;
|
||||
@ -88,11 +87,6 @@ public class BsqWalletView extends ActivatableView<AnchorPane, Void> {
|
||||
receive = new MenuItem(navigation, toggleGroup, Res.get("dao.wallet.menuItem.receive"), BsqReceiveView.class, baseNavPath);
|
||||
transactions = new MenuItem(navigation, toggleGroup, Res.get("dao.wallet.menuItem.transactions"), BsqTxView.class, baseNavPath);
|
||||
leftVBox.getChildren().addAll(send, receive, transactions);
|
||||
|
||||
if (!DevEnv.isDaoActivated()) {
|
||||
send.setDisable(true);
|
||||
transactions.setDisable(true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -108,9 +102,6 @@ public class BsqWalletView extends ActivatableView<AnchorPane, Void> {
|
||||
if (selectedViewClass == null)
|
||||
selectedViewClass = BsqSendView.class;
|
||||
|
||||
if (!DevEnv.isDaoActivated())
|
||||
selectedViewClass = BsqReceiveView.class;
|
||||
|
||||
loadView(selectedViewClass);
|
||||
} else if (viewPath.size() == 4 && viewPath.indexOf(BsqWalletView.class) == 2) {
|
||||
selectedViewClass = viewPath.get(3);
|
||||
|
@ -269,17 +269,8 @@ public abstract class MutableOfferView<M extends MutableOfferViewModel<?>> exten
|
||||
tradeFeeInBtcToggle.setSelected(currencyForMakerFeeBtc);
|
||||
tradeFeeInBsqToggle.setSelected(!currencyForMakerFeeBtc);
|
||||
|
||||
if (!DevEnv.isDaoActivated()) {
|
||||
tradeFeeInBtcToggle.setVisible(false);
|
||||
tradeFeeInBtcToggle.setManaged(false);
|
||||
tradeFeeInBsqToggle.setVisible(false);
|
||||
tradeFeeInBsqToggle.setManaged(false);
|
||||
buyBsqBox.setVisible(false);
|
||||
buyBsqBox.setManaged(false);
|
||||
} else {
|
||||
buyBsqBox.setVisible(model.isShowBuyBsqHint());
|
||||
buyBsqBox.setManaged(model.isShowBuyBsqHint());
|
||||
}
|
||||
buyBsqBox.setVisible(model.isShowBuyBsqHint());
|
||||
buyBsqBox.setManaged(model.isShowBuyBsqHint());
|
||||
|
||||
Label popOverLabel = OfferViewUtil.createPopOverLabel(Res.get("createOffer.triggerPrice.tooltip"));
|
||||
triggerPriceInfoInputTextField.setContentForPopOver(popOverLabel, AwesomeIcon.SHIELD);
|
||||
|
@ -327,17 +327,8 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
|
||||
tradeFeeInBtcToggle.setSelected(currencyForMakerFeeBtc);
|
||||
tradeFeeInBsqToggle.setSelected(!currencyForMakerFeeBtc);
|
||||
|
||||
if (!DevEnv.isDaoActivated()) {
|
||||
tradeFeeInBtcToggle.setVisible(false);
|
||||
tradeFeeInBtcToggle.setManaged(false);
|
||||
tradeFeeInBsqToggle.setVisible(false);
|
||||
tradeFeeInBsqToggle.setManaged(false);
|
||||
buyBsqBox.setVisible(false);
|
||||
buyBsqBox.setManaged(false);
|
||||
} else {
|
||||
buyBsqBox.setVisible(model.isShowBuyBsqHint());
|
||||
buyBsqBox.setManaged(model.isShowBuyBsqHint());
|
||||
}
|
||||
buyBsqBox.setVisible(model.isShowBuyBsqHint());
|
||||
buyBsqBox.setManaged(model.isShowBuyBsqHint());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -190,10 +190,6 @@ class TakeOfferViewModel extends ActivatableWithDataModel<TakeOfferDataModel> im
|
||||
updateButtonDisableState();
|
||||
|
||||
updateSpinnerInfo();
|
||||
|
||||
if (!DevEnv.isDaoActivated()) {
|
||||
isTradeFeeVisible.setValue(false);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -71,11 +71,6 @@ public class DaoPresentation implements DaoStateListener {
|
||||
}
|
||||
});
|
||||
|
||||
if (!DevEnv.isDaoActivated()) {
|
||||
bsqInfo.set("");
|
||||
bsqSyncProgress.set(0);
|
||||
}
|
||||
|
||||
walletChainHeightListener = (observable, oldValue, newValue) -> onUpdateAnyChainHeight();
|
||||
}
|
||||
|
||||
@ -84,9 +79,6 @@ public class DaoPresentation implements DaoStateListener {
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
private void onUpdateAnyChainHeight() {
|
||||
if (!DevEnv.isDaoActivated())
|
||||
return;
|
||||
|
||||
final int bsqBlockChainHeight = daoFacade.getChainHeight();
|
||||
final int bsqWalletChainHeight = bsqWalletService.getBestChainHeight();
|
||||
if (bsqWalletChainHeight > 0) {
|
||||
|
@ -664,9 +664,6 @@ public class PreferencesView extends ActivatableViewAndModel<GridPane, Preferenc
|
||||
Res.get("setting.preferences.daoOptions"), Layout.GROUP_DISTANCE);
|
||||
daoActivatedToggleButton = addSlideToggleButton(root, gridRow,
|
||||
Res.get("setting.preferences.dao.activated"), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
|
||||
if (!DevEnv.isDaoActivated()) {
|
||||
return;
|
||||
}
|
||||
|
||||
fullModeDaoMonitorToggleButton = addSlideToggleButton(root, ++gridRow,
|
||||
Res.get("setting.preferences.dao.fullModeDaoMonitor"));
|
||||
@ -1059,10 +1056,6 @@ public class PreferencesView extends ActivatableViewAndModel<GridPane, Preferenc
|
||||
new Popup().information(Res.get("setting.preferences.dao.activated.popup")).useShutDownButton().show();
|
||||
});
|
||||
|
||||
if (!DevEnv.isDaoActivated()) {
|
||||
return;
|
||||
}
|
||||
|
||||
fullModeDaoMonitorToggleButton.setSelected(preferences.isUseFullModeDaoMonitor());
|
||||
fullModeDaoMonitorToggleButton.setOnAction(e -> {
|
||||
preferences.setUseFullModeDaoMonitor(fullModeDaoMonitorToggleButton.isSelected());
|
||||
@ -1227,9 +1220,6 @@ public class PreferencesView extends ActivatableViewAndModel<GridPane, Preferenc
|
||||
|
||||
private void deactivateDaoPreferences() {
|
||||
daoActivatedToggleButton.setOnAction(null);
|
||||
if (!DevEnv.isDaoActivated()) {
|
||||
return;
|
||||
}
|
||||
|
||||
fullModeDaoMonitorToggleButton.setOnAction(null);
|
||||
resyncDaoFromResourcesButton.setOnAction(null);
|
||||
|
Loading…
Reference in New Issue
Block a user