diff --git a/Flow.Launcher.Infrastructure/Image/ImageLoader.cs b/Flow.Launcher.Infrastructure/Image/ImageLoader.cs index 73f565a33..ac333d567 100644 --- a/Flow.Launcher.Infrastructure/Image/ImageLoader.cs +++ b/Flow.Launcher.Infrastructure/Image/ImageLoader.cs @@ -39,7 +39,6 @@ namespace Flow.Launcher.Infrastructure.Image var usage = LoadStorageToConcurrentDictionary(); - foreach (var icon in new[] { Constant.DefaultIcon, Constant.MissingImgIcon }) { ImageSource img = new BitmapImage(new Uri(icon)); diff --git a/Flow.Launcher/ViewModel/ResultViewModel.cs b/Flow.Launcher/ViewModel/ResultViewModel.cs index fa0c51a65..c91bbb107 100644 --- a/Flow.Launcher/ViewModel/ResultViewModel.cs +++ b/Flow.Launcher/ViewModel/ResultViewModel.cs @@ -1,14 +1,11 @@ using System; -using System.Threading; using System.Threading.Tasks; using System.Windows; using System.Windows.Media; -using Flow.Launcher.Infrastructure; using Flow.Launcher.Infrastructure.Image; using Flow.Launcher.Infrastructure.Logger; using Flow.Launcher.Infrastructure.UserSettings; using Flow.Launcher.Plugin; -using Microsoft.FSharp.Core; namespace Flow.Launcher.ViewModel { @@ -128,7 +125,6 @@ namespace Flow.Launcher.ViewModel } } - public override int GetHashCode() { return Result.GetHashCode(); diff --git a/Flow.Launcher/ViewModel/ResultsForUpdate.cs b/Flow.Launcher/ViewModel/ResultsForUpdate.cs index 2257d35b0..be48f53c1 100644 --- a/Flow.Launcher/ViewModel/ResultsForUpdate.cs +++ b/Flow.Launcher/ViewModel/ResultsForUpdate.cs @@ -23,7 +23,6 @@ namespace Flow.Launcher.ViewModel Token = token; } - public ResultsForUpdate(List results, PluginMetadata metadata, Query query, CancellationToken token) { Results = results; diff --git a/Flow.Launcher/ViewModel/ResultsViewModel.cs b/Flow.Launcher/ViewModel/ResultsViewModel.cs index 932d6fc4b..1b8dd602d 100644 --- a/Flow.Launcher/ViewModel/ResultsViewModel.cs +++ b/Flow.Launcher/ViewModel/ResultsViewModel.cs @@ -2,8 +2,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Collections.Specialized; -using System.ComponentModel; -using System.Configuration; using System.Linq; using System.Threading; using System.Threading.Tasks; @@ -11,7 +9,6 @@ using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; -using System.Windows.Forms; using Flow.Launcher.Infrastructure.UserSettings; using Flow.Launcher.Plugin; @@ -137,13 +134,11 @@ namespace Flow.Launcher.ViewModel Results.Update(Results.Where(r => r.Result.PluginID != metadata.ID).ToList()); } - /// /// To avoid deadlock, this method should not called from main thread /// public void AddResults(List newRawResults, string resultId) { - lock (_collectionLock) { var newResults = NewResults(newRawResults, resultId); @@ -193,8 +188,6 @@ namespace Flow.Launcher.ViewModel Results.Update(newResults, token); if (Results.Any()) SelectedItem = Results[0]; - - } switch (Visbility) @@ -212,7 +205,6 @@ namespace Flow.Launcher.ViewModel } - private List NewResults(List newRawResults, string resultId) { if (newRawResults.Count == 0) @@ -222,8 +214,6 @@ namespace Flow.Launcher.ViewModel var newResults = newRawResults.Select(r => new ResultViewModel(r, _settings)).ToList(); - - return results.Where(r => r.Result.PluginID != resultId) .Concat(results.Intersect(newResults).Union(newResults)) .OrderByDescending(r => r.Result.Score) @@ -245,7 +235,6 @@ namespace Flow.Launcher.ViewModel } #endregion - #region FormattedText Dependency Property public static readonly DependencyProperty FormattedTextProperty = DependencyProperty.RegisterAttached( "FormattedText", @@ -279,7 +268,6 @@ namespace Flow.Launcher.ViewModel public class ResultCollection : ObservableCollection { - private long editTime = 0; private bool _suppressNotifying = false; @@ -323,9 +311,6 @@ namespace Flow.Launcher.ViewModel ClearItems(); } - - - /// /// Update the results collection with new results, try to keep identical results ///