Tidying
This commit is contained in:
@@ -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 () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user