Version 3.0.260

This commit is contained in:
Oliver Hauff 2021-11-07 21:28:13 +01:00
parent 5a26bf273b
commit 4df8aa98aa
134 changed files with 8098 additions and 567 deletions

View file

@ -2,6 +2,7 @@
using System.Linq;
using TINK.Model;
using TINK.Model.Connector;
using TINK.Model.Connector.Filter;
using Xamarin.Forms;
namespace TINK.ViewModel.Map
@ -28,21 +29,21 @@ namespace TINK.ViewModel.Map
}
/// <summary> Gets value whether TINK is enabled or not. </summary>
public bool IsTinkEnabled => !string.IsNullOrEmpty(CurrentFilter) && CurrentFilter != FilterHelper.FILTERTINKGENERAL;
public bool IsTinkEnabled => !string.IsNullOrEmpty(CurrentFilter) && CurrentFilter.GetBikeCategory() != FilterHelper.FILTERTINKGENERAL;
/// <summary> Gets color of the TINK button. </summary>
public Color TinkColor => CurrentFilter == FilterHelper.FILTERTINKGENERAL ? Color.Blue : Color.Gray;
public Color TinkColor => CurrentFilter.GetBikeCategory() == FilterHelper.FILTERTINKGENERAL ? Color.Blue : Color.Gray;
/// <summary> Gets value whether Konrad is enabled or not. </summary>
public bool IsKonradEnabled => !string.IsNullOrEmpty(CurrentFilter) && CurrentFilter != FilterHelper.FILTERKONRAD;
public bool IsKonradEnabled => !string.IsNullOrEmpty(CurrentFilter) && CurrentFilter.GetBikeCategory() != FilterHelper.FILTERKONRAD;
/// <summary> Gets color of the Konrad button. </summary>
public Color KonradColor => CurrentFilter == FilterHelper.FILTERKONRAD ? Color.Red : Color.Gray;
public Color KonradColor => CurrentFilter.GetBikeCategory() == FilterHelper.FILTERKONRAD ? Color.Red : Color.Gray;
/// <summary> Gets whether toggle functionality is visible or not. </summary>
public bool IsToggleVisible =>
FilterDictionary.ContainsKey(FilterHelper.FILTERKONRAD)
&& FilterDictionary.ContainsKey(FilterHelper.FILTERTINKGENERAL)
FilterDictionary.Select(x => x.Key).ContainsGroupId(FilterHelper.FILTERKONRAD)
&& FilterDictionary.Select(x => x.Key).ContainsGroupId(FilterHelper.FILTERTINKGENERAL)
&& (IsTinkEnabled || IsKonradEnabled);
/// <summary>