do not close avatarapp on hiding tablet

This commit is contained in:
Alexander Ivash 2018-07-06 23:19:38 +03:00
parent 19f37246a6
commit 168584169c

View file

@ -422,7 +422,6 @@ startup();
var isWired = false; var isWired = false;
function off() { function off() {
if (isWired) { // It is not ok to disconnect these twice, hence guard. if (isWired) { // It is not ok to disconnect these twice, hence guard.
tablet.tabletShownChanged.disconnect(tabletVisibilityChanged);
isWired = false; isWired = false;
} }
@ -460,12 +459,6 @@ function on() {
MyAvatar.targetScaleChanged.connect(onTargetScaleChanged); MyAvatar.targetScaleChanged.connect(onTargetScaleChanged);
} }
function tabletVisibilityChanged() {
if (!tablet.tabletShown) {
tablet.gotoHomeScreen();
}
}
function onTabletButtonClicked() { function onTabletButtonClicked() {
if (onAvatarAppScreen) { if (onAvatarAppScreen) {
// for toolbar-mode: go back to home screen, this will close the window. // for toolbar-mode: go back to home screen, this will close the window.
@ -473,7 +466,6 @@ function onTabletButtonClicked() {
} else { } else {
ContextOverlay.enabled = false; ContextOverlay.enabled = false;
tablet.loadQMLSource(AVATARAPP_QML_SOURCE); tablet.loadQMLSource(AVATARAPP_QML_SOURCE);
tablet.tabletShownChanged.connect(tabletVisibilityChanged);
isWired = true; isWired = true;
} }
} }