mirror of
https://github.com/overte-org/community-apps.git
synced 2025-04-07 02:22:35 +02:00
Don't close all polls when you close yours.
This commit is contained in:
parent
a5883b1b2f
commit
2a7bfad711
2 changed files with 6 additions and 3 deletions
|
@ -14,6 +14,7 @@
|
|||
// TODO: Documentation
|
||||
// TODO: Save questions and answers locally
|
||||
// TODO: Allow more than 9 candidates
|
||||
// TODO: Allow host voting
|
||||
|
||||
(() => {
|
||||
"use strict";
|
||||
|
@ -247,11 +248,13 @@
|
|||
|
||||
// Polls closed :)
|
||||
if (message.type == "close_poll") {
|
||||
var isOurPoll = poll.id == message.poll.id;
|
||||
|
||||
// Tell UI to close poll
|
||||
_emitEvent({type: "close_poll", poll: {id: message.poll.id}});
|
||||
_emitEvent({type: "close_poll", change_page: isOurPoll, poll: {id: message.poll.id}});
|
||||
|
||||
// Unregister self from poll
|
||||
leavePoll();
|
||||
if (isOurPoll) leavePoll();
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
|
@ -627,7 +627,7 @@ Rectangle {
|
|||
|
||||
// Close the poll and remove it from the list of active polls
|
||||
case "close_poll":
|
||||
current_page = "poll_list"
|
||||
if (message.isOurPoll) current_page = "poll_list"
|
||||
|
||||
// Find the poll with the matching ID and remove it from active polls
|
||||
for (var i = 0; i < active_polls.count; i++) {
|
||||
|
|
Loading…
Reference in a new issue