diff --git a/applications/more/more.js b/applications/more/more.js index 250fa8e..e30e869 100644 --- a/applications/more/more.js +++ b/applications/more/more.js @@ -22,6 +22,7 @@ var active = false; tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system"); + tablet.screenChanged.connect(onScreenChanged); app_button = tablet.addButton({ icon: Script.resolvePath("./img/icon_white.png"), @@ -184,6 +185,15 @@ }); } + function onScreenChanged(type, url) { + if (url != Script.resolvePath("./more.qml")) { + active = false; + app_button.editProperties({ + isActive: active, + }); + } + } + async function request(url) { var xmlHttp = new XMLHttpRequest(); xmlHttp.open("GET", url, false);