From d3af0cfcb5e18e2fdc8c43b8c08ef9917def8234 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Fri, 8 Apr 2022 16:45:32 +0000 Subject: [PATCH] Update content of files --- data/webappcontent.telegram.org/demo.html | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/data/webappcontent.telegram.org/demo.html b/data/webappcontent.telegram.org/demo.html index 72f4cb57b8..acbef8966c 100644 --- a/data/webappcontent.telegram.org/demo.html +++ b/data/webappcontent.telegram.org/demo.html @@ -187,9 +187,7 @@ function changeButton() { if (result.response) { if (result.response.ok) { $('#btn_status').html('Button changed!').addClass('ok').show(); - setTimeout(function() { - Telegram.WebApp.close(); - }, 500); + Telegram.WebApp.close(); } else { $('#btn_status').text(result.response.description).addClass('err').show(); alert(result.response.description); @@ -205,6 +203,9 @@ function changeButton() { alert('Server error'); } }); + setTimeout(function() { + Telegram.WebApp.close(); + }, 50); } function byteLength(str) { if (window.Blob) {