Fix countdown showing if restart with dialog open and recording enabled

This commit is contained in:
David Rowe 2017-04-07 11:01:11 +12:00
parent f164fe7532
commit 49907970fb

View file

@ -342,6 +342,15 @@
}
function tearDown() {
if (!tablet) {
return;
}
tablet.webEventReceived.disconnect(onWebEventReceived);
tablet.tabletShownChanged.disconnect(onTabletShownChanged);
tablet.screenChanged.disconnect(onTabletScreenChanged);
button.clicked.disconnect(onButtonClicked);
if (recordingState === COUNTING_DOWN) {
cancelCountdown();
} else if (recordingState === RECORDING) {
@ -352,13 +361,6 @@
tablet.gotoHomeScreen();
}
if (!tablet) {
return;
}
tablet.webEventReceived.disconnect(onWebEventReceived);
tablet.tabletShownChanged.disconnect(onTabletShownChanged);
tablet.screenChanged.disconnect(onTabletScreenChanged);
button.clicked.disconnect(onButtonClicked);
tablet.removeButton(button);
}