about summary refs log tree commit diff
path: root/src/platform
diff options
context:
space:
mode:
authorAnsh <anshnanda10@gmail.com>2023-06-14 13:26:44 -0700
committerGitHub <noreply@github.com>2023-06-14 15:26:44 -0500
commit9b9f339e3e72587bb31e2d1b6e77e9ec804302bf (patch)
treeabe53792959cd43f6ceab2b35df8fb6ecc4a80b6 /src/platform
parent71af9fd04b49cd4ea0d33632a0b3b47f8a30fb0f (diff)
downloadvoidsky-9b9f339e3e72587bb31e2d1b6e77e9ec804302bf.tar.zst
[APP-686] Fix mobile web styling (#876)
* fix desktop window size

* fix desktop window size

* add listener for resize events

* fix when going from mobile to web

* only add eventListener for web
Diffstat (limited to 'src/platform')
-rw-r--r--src/platform/detection.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/platform/detection.ts b/src/platform/detection.ts
index 5d2ffcb22..da33fdca7 100644
--- a/src/platform/detection.ts
+++ b/src/platform/detection.ts
@@ -4,8 +4,9 @@ export const isIOS = Platform.OS === 'ios'
 export const isAndroid = Platform.OS === 'android'
 export const isNative = isIOS || isAndroid
 export const isWeb = !isNative
+export const isMobileWebMediaQuery = 'only screen and (max-width: 1230px)'
 export const isMobileWeb =
   isWeb &&
   // @ts-ignore we know window exists -prf
-  global.window.matchMedia('only screen and (max-width: 1000px)')?.matches
+  global.window.matchMedia(isMobileWebMediaQuery)?.matches
 export const isDesktopWeb = isWeb && !isMobileWeb