if tablet wasn't visible when wallet passphrase screen hid it, don't show it when passphrase page is done.

This commit is contained in:
Seth Alves 2018-03-15 11:39:05 -07:00
parent 8a0b8aa034
commit a64f0d2779

View file

@ -117,8 +117,19 @@ var selectionDisplay = null; // for gridTool.js to ignore
var onWalletScreen = false;
var onCommerceScreen = false;
var tabletShouldBeVisibleInSecondaryCamera = false;
function setTabletVisibleInSecondaryCamera(visibleInSecondaryCam) {
if (visibleInSecondaryCam) {
// if we're potentially showing the tablet, only do so if it was visible before
if (!tabletShouldBeVisibleInSecondaryCamera) {
return;
}
} else {
// if we're hiding the tablet, check to see if it was visible in the first place
tabletShouldBeVisibleInSecondaryCamera = Overlays.getProperty(HMD.tabletID, "isVisibleInSecondaryCamera");
}
Overlays.editOverlay(HMD.tabletID, { isVisibleInSecondaryCamera : visibleInSecondaryCam });
Overlays.editOverlay(HMD.homeButtonID, { isVisibleInSecondaryCamera : visibleInSecondaryCam });
Overlays.editOverlay(HMD.homeButtonHighlightIDtabletID, { isVisibleInSecondaryCamera : visibleInSecondaryCam });