This commit is contained in:
2025-11-08 18:57:28 +01:00
parent 802c0c3f09
commit 62146ff970

View File

@@ -2,6 +2,8 @@ import {Capacitor} from "@capacitor/core";
import {Device} from "@capacitor/device"; import {Device} from "@capacitor/device";
import {Network} from "@capacitor/network"; import {Network} from "@capacitor/network";
const override = false
export const useCapacitor = () => { export const useCapacitor = () => {
const getPlatform = () => { const getPlatform = () => {
return Capacitor.getPlatform() return Capacitor.getPlatform()
@@ -14,11 +16,11 @@ export const useCapacitor = () => {
const getIsPhone = async () => { const getIsPhone = async () => {
let deviceInfo = await useCapacitor().getDeviceInfo() let deviceInfo = await useCapacitor().getDeviceInfo()
return deviceInfo.model.toLowerCase().includes('iphone') return override || deviceInfo.model.toLowerCase().includes('iphone')
} }
const getIsNative = () => { const getIsNative = () => {
return Capacitor.isNativePlatform() return override || Capacitor.isNativePlatform()
} }
const getNetworkStatus = async () => { const getNetworkStatus = async () => {