mirror of
https://github.com/overte-org/overte.git
synced 2025-04-12 11:58:24 +02:00
Fix snapshot connection errors
This commit is contained in:
parent
3a096381ce
commit
6e5eff9407
1 changed files with 7 additions and 3 deletions
|
@ -384,7 +384,6 @@ function onButtonClicked() {
|
|||
} else {
|
||||
fillImageDataFromPrevious();
|
||||
tablet.gotoWebScreen(SNAPSHOT_REVIEW_URL);
|
||||
tablet.webEventReceived.connect(onMessage);
|
||||
HMD.openTablet();
|
||||
}
|
||||
}
|
||||
|
@ -659,10 +658,15 @@ function maybeDeleteSnapshotStories() {
|
|||
storyIDsToMaybeDelete = [];
|
||||
}
|
||||
function onTabletScreenChanged(type, url) {
|
||||
var wasInSnapshotReview = isInSnapshotReview;
|
||||
isInSnapshotReview = (type === "Web" && url === SNAPSHOT_REVIEW_URL);
|
||||
button.editProperties({ isActive: isInSnapshotReview });
|
||||
if (!isInSnapshotReview) {
|
||||
tablet.webEventReceived.disconnect(onMessage);
|
||||
if (isInSnapshotReview !== wasInSnapshotReview) {
|
||||
if (isInSnapshotReview) {
|
||||
tablet.webEventReceived.connect(onMessage);
|
||||
} else {
|
||||
tablet.webEventReceived.disconnect(onMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
function onUsernameChanged() {
|
||||
|
|
Loading…
Reference in a new issue