Limit theme refresh to when color scheme is "System"

Previously, the theme was refreshed on every theme change event.
Now, `_theme.RefreshFrameAsync()` is only called if the color
scheme setting is set to "System", preventing unnecessary
refreshes in other scenarios.
This commit is contained in:
Jack251970 2026-02-28 21:23:20 +08:00
parent 60b92c5b96
commit 5635783973

View file

@ -109,7 +109,10 @@ namespace Flow.Launcher
private void ViewModel_ActualApplicationThemeChanged(object sender, ActualApplicationThemeChangedEventArgs args) private void ViewModel_ActualApplicationThemeChanged(object sender, ActualApplicationThemeChangedEventArgs args)
{ {
_ = _theme.RefreshFrameAsync(); if (_settings.ColorScheme == Constant.System)
{
_ = _theme.RefreshFrameAsync();
}
} }
private void OnSourceInitialized(object sender, EventArgs e) private void OnSourceInitialized(object sender, EventArgs e)