From b6613d50859b178d71efcfcbdeac2551a0d968de Mon Sep 17 00:00:00 2001 From: Gorbachev Egor <7gorbachevm@gmail.com> Date: Wed, 11 Oct 2023 17:12:51 +0700 Subject: [PATCH] WebApp.expand() from the very beginning --- src/main.tsx | 1 + src/screens/deck-review/deck-preview.tsx | 2 -- src/store/screen-store.ts | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main.tsx b/src/main.tsx index 1e6d6353..71b4ba63 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -6,6 +6,7 @@ import "@mdi/font/css/materialdesignicons.min.css"; import WebApp from "@twa-dev/sdk"; WebApp.ready(); +WebApp.expand(); WebApp.enableClosingConfirmation(); ReactDOM.createRoot(document.getElementById("root")!).render(); diff --git a/src/screens/deck-review/deck-preview.tsx b/src/screens/deck-review/deck-preview.tsx index 9c23453b..5cf4fd2e 100644 --- a/src/screens/deck-review/deck-preview.tsx +++ b/src/screens/deck-review/deck-preview.tsx @@ -34,8 +34,6 @@ export const DeckPreview = observer(() => { } reviewStore.startDeckReview(deckListStore.selectedDeck.cardsToReview); - - WebApp.expand(); }; WebApp.MainButton.onClick(onClick); diff --git a/src/store/screen-store.ts b/src/store/screen-store.ts index b863e7b0..9f793f9c 100644 --- a/src/store/screen-store.ts +++ b/src/store/screen-store.ts @@ -34,7 +34,6 @@ export class ScreenStore { navigateToDeckForm(deckFormId?: number) { this.screen = Screen.DeckForm; this.deckFormId = deckFormId; - WebApp.expand(); } get isDeckScreen() {