Skip to content

[Bug]: miniApp.mountSync() also mounts themeParams #766

@erfanmola

Description

@erfanmola

Telegram Application

Telegram for Android

Describe the Bug

Calling miniApp.mountSync() also does mount the themeParams, making themeParams.isMounted() to be true, so codes like this will fail:

To Reproduce

		if (miniApp.mountSync.isAvailable() && !miniApp.isMounted()) {
			console.log("Bind Mini App");
			miniApp.mountSync();
			bindMiniAppCssVars();
		}

		if (themeParams.mountSync.isAvailable() && !themeParams.isMounted()) {
			console.log("Bind Theme");
			themeParams.mountSync();
			bindThemeParamsCssVars();
		}

This is not the case for viewport.mount(), these should be documented somewhere to not find it by accident or bug.

Expected Behavior

if themeParams is being mounted as a part of miniApp, then why separate them? if they need to be separate, their functinalities and mounting should be separate too.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions