mirror of
				https://github.com/house-of-abbey/GarminHomeAssistant.git
				synced 2025-11-04 08:58:13 +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;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user