Host closes tablet fix.

This commit is contained in:
armored-dragon 2024-09-04 15:04:17 -05:00
parent 39eed69596
commit 6260f88e2b
No known key found for this signature in database
GPG key ID: C7207ACC3382AD8B
2 changed files with 10 additions and 1 deletions

View file

@ -60,7 +60,10 @@
active = true;
// If we are connected to a poll already, repopulate the screen
if (poll.id != '') return joinPoll({id: poll.id});
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"});
// Request a list of active polls if we are not already in one
if (poll.id == '') return getActivePolls();

View file

@ -648,6 +648,12 @@ Rectangle {
}
}
break;
// Open the host view
// Only called when the host closes their tablet and reopens it.
case "rehost":
current_page = "poll_host_view"
break;
}
}