Feature: add some more debug information to the settings

This commit is contained in:
Pieter Vander Vennet 2025-08-11 18:53:01 +02:00
parent ad611b5aaa
commit 55f2e62ed0

View file

@ -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<T> {
private readonly _store: UIEventSource<T[]>
@ -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
}