diff --git a/src/Logic/State/UserRelatedState.ts b/src/Logic/State/UserRelatedState.ts index abb8df6f2..ac302141c 100644 --- a/src/Logic/State/UserRelatedState.ts +++ b/src/Logic/State/UserRelatedState.ts @@ -21,6 +21,7 @@ import { LocalStorageSource } from "../Web/LocalStorageSource" import { GeocodeResult } from "../Search/GeocodingProvider" import Translations from "../../UI/i18n/Translations" import { Lists } from "../../Utils/Lists" +import { AndroidPolyfill } from "../Web/AndroidPolyfill" class RoundRobinStore { private readonly _store: UIEventSource @@ -673,6 +674,20 @@ export default class UserRelatedState { amendedPrefs.ping() }) + amendedPrefs.data["___device_pixel_ratio"] = ""+window.devicePixelRatio + + AndroidPolyfill.getInsetSizes().top.addCallbackAndRun(topInset => + amendedPrefs.data["___device_inset_top"] = ""+topInset + ) + + AndroidPolyfill.getInsetSizes().bottom.addCallbackAndRun(topInset => + amendedPrefs.data["___device_inset_bottom"] = ""+topInset + ) + AndroidPolyfill.inAndroid.addCallbackAndRun(isAndroid => { + amendedPrefs.data["___device_is_android"] = ""+isAndroid + + }) + return amendedPrefs }