Removed redundant function.

Improved results screen.
This commit is contained in:
armored-dragon 2024-09-13 17:19:43 -05:00
parent 5b4b9f2bdc
commit 46b95e6f93
No known key found for this signature in database
GPG key ID: C7207ACC3382AD8B
2 changed files with 3 additions and 11 deletions

View file

@ -445,14 +445,14 @@
// Don't recreate the prompt if we already have the matching question
if (message.poll.question == poll.question && !poll.canHostVote) return;
pollStats = {iterations: 0, responses: {}, winnerSelected: false, winnerName: "", votesReceived: 0, votesCounted: 0 }
poll = message.poll;
// Play sound for new poll
_emitSound("new_prompt");
_emitEvent({type: "poll_prompt", poll: message.poll});
poll.question = message.poll.question;
pollStats.winnerSelected = false;
}
if (message.type == "vote_count") {

View file

@ -693,7 +693,6 @@ Rectangle {
anchors.fill: parent
onClicked: {
_clearHost();
_clearResults();
_changePage("poll_host_view");
votes_tallied = false;
}
@ -899,13 +898,6 @@ Rectangle {
}
}
function _clearResults(){
poll_winner.text = "---"
tally_votes_itterations.text = "-"
tally_votes_counted.text = "-"
tally_votes_received.text = "0"
}
function _clearHost(){
poll_to_respond_title.text = ""
poll_option_model_host.clear();
@ -975,7 +967,7 @@ Rectangle {
_changePage("poll_client_view");
// Clear the results page
_clearResults()
_populateResults();
// Set the options
break;