mirror of
https://github.com/house-of-abbey/GarminHomeAssistant.git
synced 2025-07-30 16:38:31 +00:00
Reordered settings
This commit is contained in:
@ -51,6 +51,15 @@
|
||||
<settingConfig type="boolean" />
|
||||
</setting>
|
||||
|
||||
<group enableIfTrue="@Properties.cache_config" id="wifiLteExection" title="@Strings.WifiLteExecution" description="@Strings.WifiLteExecutionDescription">
|
||||
<setting
|
||||
propertyKey="@Properties.wifi_lte_execution"
|
||||
title="@Strings.WifiLteExecutionEnable"
|
||||
>
|
||||
<settingConfig type="boolean" />
|
||||
</setting>
|
||||
</group>
|
||||
|
||||
<setting
|
||||
propertyKey="@Properties.enable_vibration"
|
||||
title="@Strings.SettingsVibration"
|
||||
@ -117,12 +126,4 @@
|
||||
<settingConfig type="alphaNumeric" readonly="true" />
|
||||
</setting>
|
||||
|
||||
<group enableIfTrue="@Properties.cache_config" id="wifiLteExection" title="@Strings.WifiLteExecution" description="@Strings.WifiLteExecutionDescription">
|
||||
<setting
|
||||
propertyKey="@Properties.wifi_lte_execution"
|
||||
title="@Strings.WifiLteExecutionEnable"
|
||||
>
|
||||
<settingConfig type="boolean" />
|
||||
</setting>
|
||||
</group>
|
||||
</settings>
|
||||
|
@ -62,6 +62,7 @@ class Settings {
|
||||
mConfigUrl = Properties.getValue("config_url");
|
||||
mCacheConfig = Properties.getValue("cache_config");
|
||||
mClearCache = Properties.getValue("clear_cache");
|
||||
mWifiLteExecution = Properties.getValue("wifi_lte_execution");
|
||||
mVibrate = Properties.getValue("enable_vibration");
|
||||
mAppTimeout = Properties.getValue("app_timeout");
|
||||
mPollDelay = Properties.getValue("poll_delay_combined");
|
||||
@ -70,7 +71,6 @@ class Settings {
|
||||
mMenuAlignment = Properties.getValue("menu_alignment");
|
||||
mIsSensorsLevelEnabled = Properties.getValue("enable_battery_level");
|
||||
mBatteryRefreshRate = Properties.getValue("battery_level_refresh_rate");
|
||||
mWifiLteExecution = Properties.getValue("wifi_lte_execution");
|
||||
}
|
||||
|
||||
//! A webhook is required for non-privileged API calls.
|
||||
@ -193,6 +193,18 @@ class Settings {
|
||||
Properties.setValue("clear_cache", mClearCache);
|
||||
}
|
||||
|
||||
//! Get the value of the Wi-Fi/LTE toggle in settings.
|
||||
//!
|
||||
//! @return The state of the toggle.
|
||||
//
|
||||
static function getWifiLteExecutionEnabled() as Lang.Boolean {
|
||||
// Wi-Fi/LTE sync execution on a cached menu
|
||||
if (!mCacheConfig) {
|
||||
return false;
|
||||
}
|
||||
return mWifiLteExecution;
|
||||
}
|
||||
|
||||
//! Get the vibration Boolean option supplied as part of the Settings.
|
||||
//!
|
||||
//! @return Boolean for whether vibration is enabled.
|
||||
@ -272,16 +284,4 @@ class Settings {
|
||||
}
|
||||
}
|
||||
|
||||
//! Get the value of the Wi-Fi/LTE toggle in settings.
|
||||
//!
|
||||
//! @return The state of the toggle.
|
||||
//
|
||||
static function getWifiLteExecutionEnabled() as Lang.Boolean {
|
||||
// Wi-Fi/LTE sync execution on a cached menu
|
||||
if (!mCacheConfig) {
|
||||
return false;
|
||||
}
|
||||
return mWifiLteExecution;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user