mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-05-01 10:12:31 +00:00
Improve WatchProperty
This commit is contained in:
@@ -56,11 +56,9 @@ public class App : Application, IDisposable
|
||||
.GetRequiredService<SettingsService>()
|
||||
.WatchProperty(
|
||||
o => o.Theme,
|
||||
() =>
|
||||
v =>
|
||||
{
|
||||
RequestedThemeVariant = _services
|
||||
.GetRequiredService<SettingsService>()
|
||||
.Theme switch
|
||||
RequestedThemeVariant = v switch
|
||||
{
|
||||
ThemeVariant.Light => Avalonia.Styling.ThemeVariant.Light,
|
||||
ThemeVariant.Dark => Avalonia.Styling.ThemeVariant.Dark,
|
||||
|
||||
Reference in New Issue
Block a user