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 b4ded74d6de..9daffa03fcd 100644 --- a/src/main/java/bisq/desktop/main/dao/proposal/ProposalListItem.java +++ b/src/main/java/bisq/desktop/main/dao/proposal/ProposalListItem.java @@ -30,8 +30,8 @@ import bisq.core.dao.vote.PeriodService; import bisq.core.dao.vote.proposal.Proposal; import bisq.core.dao.vote.proposal.ProposalService; -import bisq.core.dao.vote.voteresult.BooleanVoteResult; -import bisq.core.dao.vote.voteresult.VoteResult; +import bisq.core.dao.vote.voteresult.BooleanVote; +import bisq.core.dao.vote.voteresult.Vote; import bisq.core.locale.Res; import org.bitcoinj.core.Transaction; @@ -63,7 +63,7 @@ public class ProposalListItem implements BsqBlockChain.Listener { private final ReadableBsqBlockChain readableBsqBlockChain; private final BsqFormatter bsqFormatter; private final ChangeListener chainHeightListener; - private final ChangeListener voteResultChangeListener; + private final ChangeListener voteResultChangeListener; @Getter private TxConfidenceIndicator txConfidenceIndicator; @Getter @@ -111,7 +111,7 @@ public class ProposalListItem implements BsqBlockChain.Listener { readableBsqBlockChain.addListener(this); phaseChangeListener = (observable, oldValue, newValue) -> { - applyState(newValue, proposal.getVoteResult()); + applyState(newValue, proposal.getVote()); }; voteResultChangeListener = (observable, oldValue, newValue) -> { @@ -122,7 +122,7 @@ public class ProposalListItem implements BsqBlockChain.Listener { proposal.getVoteResultProperty().addListener(voteResultChangeListener); } - public void applyState(PeriodService.Phase newValue, VoteResult voteResult) { + public void applyState(PeriodService.Phase newValue, Vote vote) { actionButton.setText(""); actionButton.setVisible(false); actionButton.setOnAction(null); @@ -151,10 +151,10 @@ public void applyState(PeriodService.Phase newValue, VoteResult voteResult) { if (!isTxInPastCycle) { actionNode = actionButtonIconView; actionButton.setVisible(false); - if (proposal.getVoteResult() != null) { + if (proposal.getVote() != null) { actionButtonIconView.setVisible(true); - if (voteResult instanceof BooleanVoteResult) { - if (((BooleanVoteResult) voteResult).isAccepted()) { + if (vote instanceof BooleanVote) { + if (((BooleanVote) vote).isAccepted()) { actionButtonIconView.setId("accepted"); } else { actionButtonIconView.setId("rejected"); 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 4527e4ad5d6..22f7e6f5a50 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 @@ -40,7 +40,7 @@ import bisq.core.dao.vote.blindvote.BlindVoteService; import bisq.core.dao.vote.proposal.Proposal; import bisq.core.dao.vote.proposal.ProposalService; -import bisq.core.dao.vote.voteresult.BooleanVoteResult; +import bisq.core.dao.vote.voteresult.BooleanVote; import bisq.core.locale.Res; import bisq.common.util.Tuple2; @@ -235,17 +235,17 @@ protected void onSelectProposal(ProposalListItem item) { } private void onAccept() { - selectedProposalListItem.getProposal().setVoteResult(new BooleanVoteResult(true)); + selectedProposalListItem.getProposal().setVote(new BooleanVote(true)); updateStateAfterVote(); } private void onReject() { - selectedProposalListItem.getProposal().setVoteResult(new BooleanVoteResult(false)); + selectedProposalListItem.getProposal().setVote(new BooleanVote(false)); updateStateAfterVote(); } private void onCancelVote() { - selectedProposalListItem.getProposal().setVoteResult(null); + selectedProposalListItem.getProposal().setVote(null); updateStateAfterVote(); } diff --git a/src/main/java/bisq/desktop/main/dao/proposal/myvotes/MyVotesView.java b/src/main/java/bisq/desktop/main/dao/proposal/myvotes/MyVotesView.java index 46b9a5ad78a..d43bfac60d6 100644 --- a/src/main/java/bisq/desktop/main/dao/proposal/myvotes/MyVotesView.java +++ b/src/main/java/bisq/desktop/main/dao/proposal/myvotes/MyVotesView.java @@ -36,8 +36,8 @@ import bisq.core.dao.vote.myvote.MyVoteService; import bisq.core.dao.vote.proposal.ProposalList; import bisq.core.dao.vote.proposal.ProposalService; -import bisq.core.dao.vote.voteresult.BooleanVoteResult; -import bisq.core.dao.vote.voteresult.VoteResult; +import bisq.core.dao.vote.voteresult.BooleanVote; +import bisq.core.dao.vote.voteresult.Vote; import bisq.core.locale.Res; import bisq.core.user.Preferences; @@ -375,9 +375,9 @@ public void updateItem(final ProposalListItem item, boolean empty) { if (item != null && !empty) { actionButtonIconView = new ImageView(); - VoteResult voteResult = item.getProposal().getVoteResult(); - if (voteResult instanceof BooleanVoteResult) { - if (((BooleanVoteResult) voteResult).isAccepted()) { + Vote vote = item.getProposal().getVote(); + if (vote instanceof BooleanVote) { + if (((BooleanVote) vote).isAccepted()) { actionButtonIconView.setId("accepted"); } else { actionButtonIconView.setId("rejected");