Removed width requirement for isMobile

This commit is contained in:
WardPearce
2026-02-17 19:58:01 +13:00
parent 6a2780563a
commit b598d4ecb3
2 changed files with 2 additions and 5 deletions
+1 -4
View File
@@ -38,13 +38,10 @@ export function isMobile(): boolean {
const userAgent = navigator.userAgent;
const hasTouchSupport = 'ontouchstart' in window || navigator.maxTouchPoints > 0;
const isSmallScreen = window.innerWidth < 768;
const isUserAgentMobile =
/Mobi|Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(userAgent);
return (
(hasTouchSupport && isSmallScreen && isUserAgentMobile) || Capacitor.getPlatform() === 'android'
);
return (hasTouchSupport && isUserAgentMobile) || Capacitor.getPlatform() === 'android';
}
export function isVideoID(videoId: string): boolean {
File diff suppressed because one or more lines are too long