From f012a050cb6ae1ba7c3a3e220df0ef274546c42b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Gon=C3=A7alves=20Marchi?= Date: Tue, 3 Dec 2024 21:05:06 -0300 Subject: [PATCH] fix(Mobile): Add a correct check to show or not keybinds section (#899) --- android/app/capacitor.build.gradle | 1 - src/routes/settings/+layout.svelte | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/android/app/capacitor.build.gradle b/android/app/capacitor.build.gradle index cb0fd0024..7cf73370b 100644 --- a/android/app/capacitor.build.gradle +++ b/android/app/capacitor.build.gradle @@ -18,7 +18,6 @@ dependencies { } - if (hasProperty('postBuildExtras')) { postBuildExtras() } diff --git a/src/routes/settings/+layout.svelte b/src/routes/settings/+layout.svelte index 26c2188f4..3b840a167 100644 --- a/src/routes/settings/+layout.svelte +++ b/src/routes/settings/+layout.svelte @@ -9,7 +9,7 @@ import { SettingsStore } from "$lib/state" import { UIStore } from "$lib/state/ui" import type { NavRoute } from "$lib/types" - import { checkMobile } from "$lib/utils/Mobile" + import { checkMobile, isAndroidOriOS } from "$lib/utils/Mobile" import { onMount } from "svelte" import { _ } from "svelte-i18n" import { get, writable, type Writable } from "svelte/store" @@ -136,8 +136,8 @@ UIStore.state.sidebarOpen.subscribe(s => (sidebarOpen = s)) $: setRoutes = get(settingsRoutes) - SettingsStore.state.subscribe(value => { - let isMobile: boolean = checkMobile() + SettingsStore.state.subscribe(async value => { + let isMobile: boolean = await isAndroidOriOS() if (value.devmode) { if (!get(settingsRoutes).find(route => route.to === SettingsRoute.Developer)) { settingsRoutes.update(routes => [