mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
cache culture info
This commit is contained in:
parent
0e6fbf236a
commit
4aaa268be7
1 changed files with 6 additions and 4 deletions
|
|
@ -56,11 +56,14 @@ namespace Flow.Launcher.ViewModel
|
|||
OnPropertyChanged(nameof(ClockText));
|
||||
break;
|
||||
case nameof(Settings.Language):
|
||||
Culture = new CultureInfo(Settings.Language);
|
||||
OnPropertyChanged(nameof(ClockText));
|
||||
OnPropertyChanged(nameof(DateText));
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
Culture = new CultureInfo(Settings.Language);
|
||||
}
|
||||
|
||||
public Settings Settings { get; set; }
|
||||
|
|
@ -84,7 +87,7 @@ namespace Flow.Launcher.ViewModel
|
|||
}
|
||||
}
|
||||
|
||||
public CultureInfo cultureInfo => new CultureInfo(Settings.Language);
|
||||
public CultureInfo Culture { get; private set; }
|
||||
|
||||
public bool StartFlowLauncherOnSystemStartup
|
||||
{
|
||||
|
|
@ -506,10 +509,9 @@ namespace Flow.Launcher.ViewModel
|
|||
set { Settings.DateFormat = value; }
|
||||
}
|
||||
|
||||
public string ClockText => DateTime.Now.ToString(TimeFormat, cultureInfo);
|
||||
|
||||
public string DateText => DateTime.Now.ToString(DateFormat, cultureInfo);
|
||||
public string ClockText => DateTime.Now.ToString(TimeFormat, Culture);
|
||||
|
||||
public string DateText => DateTime.Now.ToString(DateFormat, Culture);
|
||||
|
||||
public double WindowWidthSize
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue