mirror of
https://github.com/AleziaKurdis/Overte-community-apps.git
synced 2025-04-05 14:02:21 +02:00
Fixed some syncing issues.
This commit is contained in:
parent
c2e4eacb92
commit
f6985faf59
2 changed files with 6 additions and 4 deletions
|
@ -80,10 +80,10 @@
|
|||
// If we are connected to a poll already, repopulate the screen
|
||||
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: "switch_page", page: selectedPage, poll: poll, pollStats: pollStats});
|
||||
}
|
||||
// Sync
|
||||
// TODO: switch_page optional sync components?
|
||||
_emitEvent({type: "poll_sync", poll: poll, pollStats: pollStats, isHost: poll.host == myUuid});
|
||||
if (selectedPage) _emitEvent({type: "switch_page", page: selectedPage, poll: poll, pollStats: pollStats});
|
||||
|
||||
// Request a list of active polls if we are not already in one
|
||||
if (poll.id == '') return getActivePolls();
|
||||
|
|
|
@ -1019,6 +1019,8 @@ Rectangle {
|
|||
case "poll_sync":
|
||||
poll = message.poll;
|
||||
pollStats = message.pollStats;
|
||||
is_host = message.isHost;
|
||||
canHostVote = message.poll.canHostVote;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue