mirror of
https://github.com/bitwarden/mobile
synced 2026-01-11 21:13:37 +00:00
* [PM-3340] Update timeout action for users without master password. * [PM-3340] PR fixes and refactor * [PM-3340] Raise command can execute. * [PM-3340] Fix converter name * [PM-3340] Fix variable naming --------- Co-authored-by: Federico Maccaroni <fedemkr@gmail.com>
27 lines
858 B
C#
27 lines
858 B
C#
using System;
|
|
using Xamarin.Forms;
|
|
|
|
namespace Bit.App.Utilities
|
|
{
|
|
public class BoolEnablementToTextColorConverter : IValueConverter
|
|
{
|
|
public object Convert(object value, Type targetType, object parameter,
|
|
System.Globalization.CultureInfo culture)
|
|
{
|
|
if (targetType == typeof(Color) && value is bool valueBool)
|
|
{
|
|
return valueBool ? ThemeManager.GetResourceColor("TextColor") :
|
|
ThemeManager.GetResourceColor("MutedColor");
|
|
}
|
|
throw new InvalidOperationException("The value must be a boolean with a Color target.");
|
|
}
|
|
|
|
public object ConvertBack(object value, Type targetType, object parameter,
|
|
System.Globalization.CultureInfo culture)
|
|
{
|
|
throw new NotSupportedException();
|
|
}
|
|
}
|
|
}
|
|
|