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" />
|
<settingConfig type="boolean" />
|
||||||
</setting>
|
</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
|
<setting
|
||||||
propertyKey="@Properties.enable_vibration"
|
propertyKey="@Properties.enable_vibration"
|
||||||
title="@Strings.SettingsVibration"
|
title="@Strings.SettingsVibration"
|
||||||
@ -117,12 +126,4 @@
|
|||||||
<settingConfig type="alphaNumeric" readonly="true" />
|
<settingConfig type="alphaNumeric" readonly="true" />
|
||||||
</setting>
|
</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>
|
</settings>
|
||||||
|
@ -62,6 +62,7 @@ class Settings {
|
|||||||
mConfigUrl = Properties.getValue("config_url");
|
mConfigUrl = Properties.getValue("config_url");
|
||||||
mCacheConfig = Properties.getValue("cache_config");
|
mCacheConfig = Properties.getValue("cache_config");
|
||||||
mClearCache = Properties.getValue("clear_cache");
|
mClearCache = Properties.getValue("clear_cache");
|
||||||
|
mWifiLteExecution = Properties.getValue("wifi_lte_execution");
|
||||||
mVibrate = Properties.getValue("enable_vibration");
|
mVibrate = Properties.getValue("enable_vibration");
|
||||||
mAppTimeout = Properties.getValue("app_timeout");
|
mAppTimeout = Properties.getValue("app_timeout");
|
||||||
mPollDelay = Properties.getValue("poll_delay_combined");
|
mPollDelay = Properties.getValue("poll_delay_combined");
|
||||||
@ -70,7 +71,6 @@ class Settings {
|
|||||||
mMenuAlignment = Properties.getValue("menu_alignment");
|
mMenuAlignment = Properties.getValue("menu_alignment");
|
||||||
mIsSensorsLevelEnabled = Properties.getValue("enable_battery_level");
|
mIsSensorsLevelEnabled = Properties.getValue("enable_battery_level");
|
||||||
mBatteryRefreshRate = Properties.getValue("battery_level_refresh_rate");
|
mBatteryRefreshRate = Properties.getValue("battery_level_refresh_rate");
|
||||||
mWifiLteExecution = Properties.getValue("wifi_lte_execution");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//! A webhook is required for non-privileged API calls.
|
//! A webhook is required for non-privileged API calls.
|
||||||
@ -193,6 +193,18 @@ class Settings {
|
|||||||
Properties.setValue("clear_cache", mClearCache);
|
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.
|
//! Get the vibration Boolean option supplied as part of the Settings.
|
||||||
//!
|
//!
|
||||||
//! @return Boolean for whether vibration is enabled.
|
//! @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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -24,17 +24,17 @@ using Toybox.Timer;
|
|||||||
//
|
//
|
||||||
class WifiLteExecutionConfirmDelegate extends WatchUi.ConfirmationDelegate {
|
class WifiLteExecutionConfirmDelegate extends WatchUi.ConfirmationDelegate {
|
||||||
public static var mCommandData as {
|
public static var mCommandData as {
|
||||||
:type as Lang.String,
|
:type as Lang.String,
|
||||||
:service as Lang.String?,
|
:service as Lang.String?,
|
||||||
:data as Lang.Dictionary?,
|
:data as Lang.Dictionary?,
|
||||||
:url as Lang.String?,
|
:url as Lang.String?,
|
||||||
:id as Lang.Number?,
|
:id as Lang.Number?,
|
||||||
:exit as Lang.Boolean
|
:exit as Lang.Boolean
|
||||||
};
|
};
|
||||||
|
|
||||||
private static var mTimer as Timer.Timer?;
|
private static var mTimer as Timer.Timer?;
|
||||||
private var mHasToast as Lang.Boolean = false;
|
private var mHasToast as Lang.Boolean = false;
|
||||||
private var mConfirmationView as WatchUi.Confirmation;
|
private var mConfirmationView as WatchUi.Confirmation;
|
||||||
|
|
||||||
//! Initializes a confirmation delegate to confirm a Wi-Fi or LTE command execution
|
//! Initializes a confirmation delegate to confirm a Wi-Fi or LTE command execution
|
||||||
//!
|
//!
|
||||||
|
Reference in New Issue
Block a user