mirror of
https://github.com/AleziaKurdis/Overte-community-apps.git
synced 2025-04-05 13:37:41 +02:00
Fix host window reset if can vote and user join.
Fixed recast vote if already tallied.
This commit is contained in:
parent
a175102473
commit
202198cbc5
2 changed files with 7 additions and 2 deletions
|
@ -12,11 +12,11 @@
|
|||
/* global Script Tablet Messages MyAvatar Uuid*/
|
||||
|
||||
// TODO: Documentation
|
||||
// FIXME: Reset create_poll view when switching screens
|
||||
// FIXME: Handle ties: kill both of tied results
|
||||
// FIXME: Handle ties: Last two standing are tied.
|
||||
|
||||
// FIXME: Host closes window does not return them to client view when applicable
|
||||
// FIXME: User joining in poll results mode causes window to switch to vote mode only if host can vote
|
||||
|
||||
(() => {
|
||||
"use strict";
|
||||
|
|
|
@ -593,6 +593,7 @@ Rectangle {
|
|||
RowLayout {
|
||||
width: parent.width
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
visible: !votes_tallied
|
||||
|
||||
// Recast vote
|
||||
Rectangle {
|
||||
|
@ -927,7 +928,6 @@ Rectangle {
|
|||
|
||||
// Populate the client view of the current question and options
|
||||
case "poll_prompt":
|
||||
current_page = "poll_client_view";
|
||||
active_polls_list.index_selected = -1; // Unselect whatever poll was selected (If one was selected)
|
||||
// Clear options
|
||||
poll_option_model.clear();
|
||||
|
@ -939,6 +939,10 @@ Rectangle {
|
|||
poll_option_model.append({option: option, rank: 0})
|
||||
}
|
||||
|
||||
if (is_host) return;
|
||||
|
||||
current_page = "poll_client_view";
|
||||
|
||||
// Clear the results page
|
||||
_clearResults()
|
||||
|
||||
|
@ -979,6 +983,7 @@ Rectangle {
|
|||
poll_winner.text = message.winner
|
||||
tally_votes_itterations.text = message.rounds
|
||||
tally_votes_counted.text = message.votesCounted
|
||||
votes_tallied = true
|
||||
break;
|
||||
case "received_vote":
|
||||
tally_votes_received.text = message.voteCount
|
||||
|
|
Loading…
Reference in a new issue