mirror of
https://github.com/AleziaKurdis/Overte-community-apps.git
synced 2025-04-09 23:44:29 +02:00
Fixed rehost not repopulating host view, maybe?
This commit is contained in:
parent
0700c89503
commit
fb47e24a65
2 changed files with 11 additions and 1 deletions
|
@ -66,7 +66,9 @@
|
|||
if (poll.id != '' && poll.host != myUuid) return joinPoll({id: poll.id});
|
||||
|
||||
// If we are hosting a poll, switch the screen
|
||||
if (poll.id != '' && poll.host == myUuid) return _emitEvent({type: "rehost"});
|
||||
if (poll.id != '' && poll.host == myUuid) {
|
||||
return _emitEvent({type: "rehost", prompt: {question: poll.question, options: poll.options}});
|
||||
}
|
||||
|
||||
// Request a list of active polls if we are not already in one
|
||||
if (poll.id == '') return getActivePolls();
|
||||
|
|
|
@ -695,6 +695,14 @@ Rectangle {
|
|||
// Only called when the host closes their tablet and reopens it.
|
||||
case "rehost":
|
||||
current_page = "poll_host_view"
|
||||
|
||||
poll_to_respond_title.text = message.prompt.question
|
||||
|
||||
poll_option_model_host.clear();
|
||||
for (var option of message.prompt.options){
|
||||
console.log("adding option "+ option);
|
||||
poll_option_model_host.append({option: option})
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue