Telegram-Mini-Apps / issues

Centralised storage of platform issues and enhancement proposals.
5 stars 0 forks source link

Do not automatically show application, when its static files are loaded #10

Open heyqbnk opened 1 year ago

heyqbnk commented 1 year ago

Is your feature request related to a problem? Please describe. According to official documentation (method ready()), we should call function ready() in case, when application is ready to be shown. Additionally, description of method says:

It is recommended to call this method as early as possible, as soon as all essential interface elements are loaded. Once this method is called, the loading placeholder is hidden and the Web App is shown. If the method is not called, the placeholder will be hidden only when the page is fully loaded.

The problem is application will be displayed even in case, when it did not notify native app about it is ready to be displayed. In other words, when all static files of application are loaded, it will be shown automatically, but at this time, there could be some async operations which were trying to receive required theme parameters of application. As a result, this will lead to application "flashes" as long as theme params could change on-flight.

Describe the solution you'd like Do not display application automatically. Make ready() function the only one explicit way of hiding application placeholder, because it leads to not resolvable problems.

Describe alternatives you've considered

-

Additional context

-