diff --git a/resources/settings/settings.xml b/resources/settings/settings.xml index 5bbf677..6c2cc87 100644 --- a/resources/settings/settings.xml +++ b/resources/settings/settings.xml @@ -51,6 +51,15 @@ + + + + + + - - - - - diff --git a/source/Settings.mc b/source/Settings.mc index 905ba4c..c304ee3 100644 --- a/source/Settings.mc +++ b/source/Settings.mc @@ -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; - } - } diff --git a/source/WifiLteExecutionConfirmDelegate.mc b/source/WifiLteExecutionConfirmDelegate.mc index 0bf42ae..93cd7e1 100644 --- a/source/WifiLteExecutionConfirmDelegate.mc +++ b/source/WifiLteExecutionConfirmDelegate.mc @@ -24,17 +24,17 @@ using Toybox.Timer; // class WifiLteExecutionConfirmDelegate extends WatchUi.ConfirmationDelegate { public static var mCommandData as { - :type as Lang.String, - :service as Lang.String?, - :data as Lang.Dictionary?, - :url as Lang.String?, - :id as Lang.Number?, - :exit as Lang.Boolean + :type as Lang.String, + :service as Lang.String?, + :data as Lang.Dictionary?, + :url as Lang.String?, + :id as Lang.Number?, + :exit as Lang.Boolean }; - private static var mTimer as Timer.Timer?; - private var mHasToast as Lang.Boolean = false; - private var mConfirmationView as WatchUi.Confirmation; + private static var mTimer as Timer.Timer?; + private var mHasToast as Lang.Boolean = false; + private var mConfirmationView as WatchUi.Confirmation; //! Initializes a confirmation delegate to confirm a Wi-Fi or LTE command execution //!