diff --git a/src/main/java/bisq/desktop/components/SeparatedPhaseBars.java b/src/main/java/bisq/desktop/components/SeparatedPhaseBars.java index 7e3c2cfa8d5..e68b155d851 100644 --- a/src/main/java/bisq/desktop/components/SeparatedPhaseBars.java +++ b/src/main/java/bisq/desktop/components/SeparatedPhaseBars.java @@ -17,7 +17,7 @@ package bisq.desktop.components; -import bisq.core.dao.vote.Cycles; +import bisq.core.dao.vote.PeriodService; import bisq.core.locale.Res; import bisq.common.UserThread; @@ -139,7 +139,7 @@ private void adjustWidth(double availableWidth) { @Getter public static class SeparatedPhaseBarsItem { - private final Cycles.Phase phase; + private final PeriodService.Phase phase; private final boolean showBlocks; private final IntegerProperty startValueProperty = new SimpleIntegerProperty(); private final IntegerProperty endValueProperty = new SimpleIntegerProperty(); @@ -150,7 +150,7 @@ public static class SeparatedPhaseBarsItem { @Setter private Label titleLabel; - public SeparatedPhaseBarsItem(Cycles.Phase phase, boolean showBlocks) { + public SeparatedPhaseBarsItem(PeriodService.Phase phase, boolean showBlocks) { this.phase = phase; this.showBlocks = showBlocks; } diff --git a/src/main/java/bisq/desktop/main/dao/proposal/BaseProposalView.java b/src/main/java/bisq/desktop/main/dao/proposal/BaseProposalView.java index 4a9a628553d..371fe77ba31 100644 --- a/src/main/java/bisq/desktop/main/dao/proposal/BaseProposalView.java +++ b/src/main/java/bisq/desktop/main/dao/proposal/BaseProposalView.java @@ -29,7 +29,6 @@ import bisq.core.dao.blockchain.BsqBlockChain; import bisq.core.dao.blockchain.ReadableBsqBlockChain; import bisq.core.dao.blockchain.vo.BsqBlock; -import bisq.core.dao.vote.Cycles; import bisq.core.dao.vote.PeriodService; import bisq.core.dao.vote.proposal.Proposal; import bisq.core.dao.vote.proposal.ProposalPayload; @@ -87,9 +86,9 @@ public abstract class BaseProposalView extends ActivatableView i protected GridPane detailsGridPane, gridPane; protected ProposalListItem selectedProposalListItem; protected ListChangeListener proposalListChangeListener; - protected ChangeListener phaseChangeListener; + protected ChangeListener phaseChangeListener; protected final PeriodService periodService; - protected Cycles.Phase currentPhase; + protected PeriodService.Phase currentPhase; protected Subscription phaseSubscription; private ScrollPane proposalDisplayView; @@ -237,7 +236,7 @@ protected void onSelectProposal(ProposalListItem item) { hideProposalDisplay(); } - protected void onPhaseChanged(Cycles.Phase phase) { + protected void onPhaseChanged(PeriodService.Phase phase) { if (!phase.equals(this.currentPhase)) { this.currentPhase = phase; onSelectProposal(selectedProposalListItem); diff --git a/src/main/java/bisq/desktop/main/dao/proposal/ProposalListItem.java b/src/main/java/bisq/desktop/main/dao/proposal/ProposalListItem.java index dcf156b8147..99903701125 100644 --- a/src/main/java/bisq/desktop/main/dao/proposal/ProposalListItem.java +++ b/src/main/java/bisq/desktop/main/dao/proposal/ProposalListItem.java @@ -27,7 +27,6 @@ import bisq.core.dao.blockchain.ReadableBsqBlockChain; import bisq.core.dao.blockchain.vo.BsqBlock; import bisq.core.dao.blockchain.vo.Tx; -import bisq.core.dao.vote.Cycles; import bisq.core.dao.vote.PeriodService; import bisq.core.dao.vote.proposal.Proposal; import bisq.core.dao.vote.proposal.ProposalService; @@ -73,7 +72,7 @@ public class ProposalListItem implements BsqBlockChain.Listener { private TxConfidenceListener txConfidenceListener; private Tooltip tooltip = new Tooltip(Res.get("confidence.unknown")); private Transaction walletTransaction; - private ChangeListener phaseChangeListener; + private ChangeListener phaseChangeListener; private AutoTooltipButton actionButton; private ImageView actionButtonIconView; @Setter @@ -123,7 +122,7 @@ public class ProposalListItem implements BsqBlockChain.Listener { proposal.getVoteResultProperty().addListener(voteResultChangeListener); } - public void applyState(Cycles.Phase newValue, VoteResult voteResult) { + public void applyState(PeriodService.Phase newValue, VoteResult voteResult) { actionButton.setText(""); actionButton.setVisible(false); actionButton.setOnAction(null); diff --git a/src/main/java/bisq/desktop/main/dao/proposal/active/ActiveProposalsView.java b/src/main/java/bisq/desktop/main/dao/proposal/active/ActiveProposalsView.java index f0d8b6df22a..268c08d4fe8 100644 --- a/src/main/java/bisq/desktop/main/dao/proposal/active/ActiveProposalsView.java +++ b/src/main/java/bisq/desktop/main/dao/proposal/active/ActiveProposalsView.java @@ -32,7 +32,6 @@ import bisq.core.btc.wallet.BsqWalletService; import bisq.core.btc.wallet.InsufficientBsqException; import bisq.core.dao.blockchain.ReadableBsqBlockChain; -import bisq.core.dao.vote.Cycles; import bisq.core.dao.vote.PeriodService; import bisq.core.dao.vote.blindvote.BlindVoteService; import bisq.core.dao.vote.proposal.Proposal; @@ -252,10 +251,10 @@ private void onCancelVote() { } @Override - protected void onPhaseChanged(Cycles.Phase phase) { + protected void onPhaseChanged(PeriodService.Phase phase) { super.onPhaseChanged(phase); - changeVoteViewItemsVisibility(phase == Cycles.Phase.BLIND_VOTE); + changeVoteViewItemsVisibility(phase == PeriodService.Phase.BLIND_VOTE); if (removeButton != null) { removeButton.setManaged(false); diff --git a/src/main/java/bisq/desktop/main/dao/proposal/dashboard/ProposalDashboardView.java b/src/main/java/bisq/desktop/main/dao/proposal/dashboard/ProposalDashboardView.java index 98ba599034c..4b06d9bc1ec 100644 --- a/src/main/java/bisq/desktop/main/dao/proposal/dashboard/ProposalDashboardView.java +++ b/src/main/java/bisq/desktop/main/dao/proposal/dashboard/ProposalDashboardView.java @@ -23,7 +23,6 @@ import bisq.desktop.util.Layout; import bisq.core.btc.wallet.BsqWalletService; -import bisq.core.dao.vote.Cycles; import bisq.core.dao.vote.PeriodService; import bisq.core.locale.Res; @@ -50,7 +49,7 @@ public class ProposalDashboardView extends ActivatableView { private List phaseBarsItems; private final BsqWalletService bsqWalletService; private final PeriodService periodService; - private Cycles.Phase currentPhase; + private PeriodService.Phase currentPhase; private Subscription phaseSubscription; private GridPane gridPane; private int gridRow = 0; @@ -98,14 +97,14 @@ public void initialize() { private SeparatedPhaseBars createSeparatedPhaseBars() { phaseBarsItems = Arrays.asList( - new SeparatedPhaseBars.SeparatedPhaseBarsItem(Cycles.Phase.PROPOSAL, true), - new SeparatedPhaseBars.SeparatedPhaseBarsItem(Cycles.Phase.BREAK1, false), - new SeparatedPhaseBars.SeparatedPhaseBarsItem(Cycles.Phase.BLIND_VOTE, true), - new SeparatedPhaseBars.SeparatedPhaseBarsItem(Cycles.Phase.BREAK2, false), - new SeparatedPhaseBars.SeparatedPhaseBarsItem(Cycles.Phase.VOTE_REVEAL, true), - new SeparatedPhaseBars.SeparatedPhaseBarsItem(Cycles.Phase.BREAK3, false), - new SeparatedPhaseBars.SeparatedPhaseBarsItem(Cycles.Phase.ISSUANCE, false), - new SeparatedPhaseBars.SeparatedPhaseBarsItem(Cycles.Phase.BREAK4, false)); + new SeparatedPhaseBars.SeparatedPhaseBarsItem(PeriodService.Phase.PROPOSAL, true), + new SeparatedPhaseBars.SeparatedPhaseBarsItem(PeriodService.Phase.BREAK1, false), + new SeparatedPhaseBars.SeparatedPhaseBarsItem(PeriodService.Phase.BLIND_VOTE, true), + new SeparatedPhaseBars.SeparatedPhaseBarsItem(PeriodService.Phase.BREAK2, false), + new SeparatedPhaseBars.SeparatedPhaseBarsItem(PeriodService.Phase.VOTE_REVEAL, true), + new SeparatedPhaseBars.SeparatedPhaseBarsItem(PeriodService.Phase.BREAK3, false), + new SeparatedPhaseBars.SeparatedPhaseBarsItem(PeriodService.Phase.ISSUANCE, false), + new SeparatedPhaseBars.SeparatedPhaseBarsItem(PeriodService.Phase.BREAK4, false)); return new SeparatedPhaseBars(phaseBarsItems); }