Version 3.0.363

This commit is contained in:
Anja 2023-04-19 12:14:14 +02:00
parent 4ff3307997
commit 91d42552c7
212 changed files with 1799 additions and 1318 deletions

View file

@ -194,7 +194,7 @@ namespace TINK.Model.Settings
}
/// <summary> Sets whether polling is on or off and the periode if polling is on. </summary>
/// <summary> Sets whether polling is on or off and the period if polling is on. </summary>
/// <param name="settingsJSON">Dictionary to write entries to.</param>
public static Dictionary<string, string> SetPollingParameters(
this IDictionary<string, string> targetDictionary,
@ -210,19 +210,19 @@ namespace TINK.Model.Settings
}).ToDictionary(key => key.Key, value => value.Value);
}
/// <summary> Get whether polling is on or off and the periode if polling is on. </summary>
/// <summary> Get whether polling is on or off and the period if polling is on. </summary>
/// <param name="settingsJSON">Dictionary holding parameters from JSON.</param>
/// <returns>Polling parameters.</returns>
public static PollingParameters GetPollingParameters(this IDictionary<string, string> settingsJSON)
{
// Check if dictionary contains entry for periode.
if (settingsJSON.TryGetValue($"{typeof(PollingParameters).Name}_{typeof(TimeSpan).Name}", out string periode)
// Check if dictionary contains entry for period.
if (settingsJSON.TryGetValue($"{typeof(PollingParameters).Name}_{typeof(TimeSpan).Name}", out string period)
&& settingsJSON.TryGetValue($"{typeof(PollingParameters).Name}_{typeof(bool).Name}", out string active)
&& !string.IsNullOrEmpty(periode)
&& !string.IsNullOrEmpty(period)
&& !string.IsNullOrEmpty(active))
{
return new PollingParameters(
JsonConvert.DeserializeObject<TimeSpan>(periode),
JsonConvert.DeserializeObject<TimeSpan>(period),
JsonConvert.DeserializeObject<bool>(active));
}

View file

@ -16,15 +16,15 @@ namespace TINK.Settings
false);
/// <summary> Constructs a polling parameter object. </summary>
/// <param name="periode">Polling periode.</param>
/// <param name="period">Polling period.</param>
/// <param name="activated">True if polling is activated.</param>
public PollingParameters(TimeSpan periode, bool activated)
public PollingParameters(TimeSpan period, bool activated)
{
Periode = periode; // Can not be null because is a struct.
Periode = period; // Can not be null because is a struct.
IsActivated = activated;
}
/// <summary>Holds the polling periode.</summary>
/// <summary>Holds the polling period.</summary>
public TimeSpan Periode { get; }
/// <summary> Holds value whether polling is activated or not.</summary>

View file

@ -18,7 +18,7 @@ namespace TINK.Model.Settings
public const bool DEFAULTREPOTLEVEL = false;
/// <summary> Gets the type of the default geolocation service. </summary>
/// <remarks> Swtiched from GeolocationService (GeolocationAccuracyMediumService) to GeolocationAccuracyHighService in app version 3.0.290.</remarks>
/// <remarks> Switched from GeolocationService (GeolocationAccuracyMediumService) to GeolocationAccuracyHighService in app version 3.0.290.</remarks>
public static Type DefaultLocationService => typeof(GeolocationAccuracyHighService);
// Default value of the expires after entry. Controls the expiration time of the cache values.
@ -54,8 +54,8 @@ namespace TINK.Model.Settings
bool? isSiteCachingOn = null,
string activeTheme = null)
{
GroupFilterMapPage = groupFilterMapPage ?? new GroupFilterMapPage(); // Default behaviour: No filtering.
GroupFilterSettings = groupFilterSettings ?? new GroupFilterSettings(); // Default behaviour: No filtering.
GroupFilterMapPage = groupFilterMapPage ?? new GroupFilterMapPage(); // Default behavior: No filtering.
GroupFilterSettings = groupFilterSettings ?? new GroupFilterSettings(); // Default behavior: No filtering.
StartupSettings = startupSettings ?? new StartupSettings();
ActiveUri = GetActiveUri(activeUri);
PollingParameters = pollingParameters ?? PollingParameters.Default;
@ -64,7 +64,7 @@ namespace TINK.Model.Settings
ExpiresAfter = expiresAfter ?? DEFAULTEXPIRESAFTER;
ActiveLockService = activeLockService ?? LocksServicesContainerMutable.DefaultLocksservice;
ConnectTimeout = connectTimeout ?? new TimeSpan(0, 0, TimeOutProvider.DEFAULT_BLUETOOTHCONNECT_TIMEOUTSECONDS); // Try one sec. to connect.
ActiveGeolocationService = activeGeolocationService ?? DefaultLocationService.Name;
ActiveGeolocationService = activeGeolocationService ?? DefaultLocationService.FullName;
CenterMapToCurrentLocation = centerMapToCurrentLocation ?? GetCenterMapToCurrentLocation(activeUri);
MapSpan = mapSpan;
LogToExternalFolder = logToExternalFolder ?? false;
@ -78,7 +78,7 @@ namespace TINK.Model.Settings
/// <summary> Holds the filters loaded from settings. </summary>
public IGroupFilterSettings GroupFilterSettings { get; }
/// <summary> Holds the stettings determining app startup behavior. </summary>
/// <summary> Holds the settings determining app startup behavior. </summary>
public IStartupSettings StartupSettings { get; }
/// <summary> Holds the uri to connect to. </summary>
@ -102,7 +102,7 @@ namespace TINK.Model.Settings
/// <summary> Gets the geolocation service to use.</summary>
public string ActiveGeolocationService { get; }
/// <summary> True if map is centered to current positon, false if not to center map.</summary>
/// <summary> True if map is centered to current position, false if not to center map.</summary>
public bool CenterMapToCurrentLocation { get; }
/// <summary> Holds the map area to display. </summary>
@ -121,7 +121,7 @@ namespace TINK.Model.Settings
public static bool GetCenterMapToCurrentLocation(Uri activeUri)
{
// TINK does not require acess to current location. Deactivate center map to current location for this reason.
// TINK does not require access to current location. Deactivate center map to current location for this reason.
return !GetActiveUri(activeUri).Host.GetIsCopri();
}
}