From b93faffdc0d0fc2141cbd0738d1606b3eff5a56a Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Sat, 22 Mar 2025 23:12:20 +0800 Subject: [PATCH] Code cleanup --- Flow.Launcher/ViewModel/ResultViewModel.cs | 7 ++----- Flow.Launcher/ViewModel/ResultsViewModel.cs | 1 + 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Flow.Launcher/ViewModel/ResultViewModel.cs b/Flow.Launcher/ViewModel/ResultViewModel.cs index 172eca502..73b380394 100644 --- a/Flow.Launcher/ViewModel/ResultViewModel.cs +++ b/Flow.Launcher/ViewModel/ResultViewModel.cs @@ -21,10 +21,8 @@ namespace Flow.Launcher.ViewModel { Settings = settings; - if (result == null) - { - return; - } + if (result == null) return; + Result = result; if (Result.Glyph is { FontFamily: not null } glyph) @@ -61,7 +59,6 @@ namespace Flow.Launcher.ViewModel Glyph = glyph; } } - } public Settings Settings { get; } diff --git a/Flow.Launcher/ViewModel/ResultsViewModel.cs b/Flow.Launcher/ViewModel/ResultsViewModel.cs index 512f5c150..61566b415 100644 --- a/Flow.Launcher/ViewModel/ResultsViewModel.cs +++ b/Flow.Launcher/ViewModel/ResultsViewModel.cs @@ -28,6 +28,7 @@ namespace Flow.Launcher.ViewModel Results = new ResultCollection(); BindingOperations.EnableCollectionSynchronization(Results, _collectionLock); } + public ResultsViewModel(Settings settings) : this() { _settings = settings;