From 43d72004447aca7d6a57a9d0f6cf841998c817d8 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Thu, 17 Sep 2015 16:36:54 -0700 Subject: [PATCH] don't show restrat dialog in restricted --- lib/App.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/App.ts b/lib/App.ts index 3f18f6d1..ccc35d82 100644 --- a/lib/App.ts +++ b/lib/App.ts @@ -784,10 +784,18 @@ module TDev.RT { //? Restarts the app and pops a restart dialog export function restart(message: string, r: ResumeCtx): void { var rt = r.rt; + + if (Cloud.isRestricted()) { + rt.stopAsync() + .then(() => rt.rerunAsync()) + .done(); + return; + } + var score = Bazaar.cachedScore(rt); var scriptId = rt.currentScriptId; - rt.stopAsync().done(() => { + rt.stopAsync().done(() => { var m = new ModalDialog(); m.add(div('wall-dialog-huge wall-dialog-text-center', message || lf("try again!"))); if (score > 0)