fix formatting

This commit is contained in:
Jeremy Wu 2021-01-20 06:34:26 +11:00
parent e2e3f4a365
commit 89443bace7
4 changed files with 0 additions and 21 deletions

View file

@ -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));

View file

@ -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();

View file

@ -23,7 +23,6 @@ namespace Flow.Launcher.ViewModel
Token = token;
}
public ResultsForUpdate(List<Result> results, PluginMetadata metadata, Query query, CancellationToken token)
{
Results = results;

View file

@ -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());
}
/// <summary>
/// To avoid deadlock, this method should not called from main thread
/// </summary>
public void AddResults(List<Result> 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<ResultViewModel> NewResults(List<Result> 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<ResultViewModel>
{
private long editTime = 0;
private bool _suppressNotifying = false;
@ -323,9 +311,6 @@ namespace Flow.Launcher.ViewModel
ClearItems();
}
/// <summary>
/// Update the results collection with new results, try to keep identical results
/// </summary>