Clear host window when creating poll.

This commit is contained in:
armored-dragon 2024-09-10 15:28:45 -05:00
parent 335a682edc
commit b6ab61a28f
No known key found for this signature in database
GPG key ID: C7207ACC3382AD8B
2 changed files with 7 additions and 2 deletions

View file

@ -14,12 +14,12 @@
// TODO: Documentation
// TODO: Allow host voting
// TODO: Sound for new vote
// TODO: Clear poll host view on creating new poll
// TODO: Debug mode?
// FIXME: Handle ties
// FIXME: Running election without votes causes max stack error
// TODO: Voting results page
// TODO: Joining poll sometimes causes to double stack on other clients poll_list?
(() => {
"use strict";

View file

@ -159,7 +159,6 @@ Rectangle {
anchors.fill: parent
onClicked: {
toScript({type: "create_poll", poll: {title: poll_to_create_title.text, description: poll_to_create_description.text}});
current_page = "poll_host_view";
}
}
}
@ -681,6 +680,12 @@ Rectangle {
switch (message.type){
// Switch view to the create poll view
case "create_poll":
// Reset poll host page
poll_to_respond_title.text = "Prompt"
poll_option_model_host.clear();
// Show host page
current_page = "poll_host_view";
break;
// Add poll info to the list of active polls