Skip to content

Commit 1e603ea

Browse files
committed
Code quality
1 parent 81007f7 commit 1e603ea

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

Plugins/Flow.Launcher.Plugin.Explorer/Helper/SortOptionTranslationHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public static string GetTranslatedName(this SortOption sortOption)
1616
ArgumentNullException.ThrowIfNull(API);
1717

1818
var enumName = Enum.GetName(sortOption);
19-
var splited = enumName.Split('_');
19+
var splited = enumName!.Split('_');
2020
var name = string.Join('_', splited[..^1]);
2121
var direction = splited[^1];
2222

Plugins/Flow.Launcher.Plugin.Explorer/Views/ActionKeywordSetting.xaml.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ private void BtnCancel_OnClick(object sender, RoutedEventArgs e)
8585
DialogResult = false;
8686
Close();
8787
}
88+
8889
private void TxtCurrentActionKeyword_OnKeyDown(object sender, KeyEventArgs e)
8990
{
9091
if (e.Key == Key.Enter)
@@ -94,11 +95,13 @@ private void TxtCurrentActionKeyword_OnKeyDown(object sender, KeyEventArgs e)
9495
e.Handled = true;
9596
}
9697
}
98+
9799
public event PropertyChangedEventHandler PropertyChanged;
98100
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
99101
{
100102
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
101103
}
104+
102105
private bool SetField<T>(ref T field, T value, [CallerMemberName] string propertyName = null)
103106
{
104107
if (EqualityComparer<T>.Default.Equals(field, value))

Plugins/Flow.Launcher.Plugin.Explorer/Views/ExplorerSettings.xaml.cs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
using Flow.Launcher.Plugin.Explorer.Search.QuickAccessLinks;
2-
using Flow.Launcher.Plugin.Explorer.ViewModels;
3-
using System.Collections.Generic;
4-
using System.ComponentModel;
1+
using System.ComponentModel;
52
using System.IO;
63
using System.Linq;
74
using System.Windows;
85
using System.Windows.Controls;
6+
using Flow.Launcher.Plugin.Explorer.Search.QuickAccessLinks;
7+
using Flow.Launcher.Plugin.Explorer.ViewModels;
98
using DataFormats = System.Windows.DataFormats;
109
using DragDropEffects = System.Windows.DragDropEffects;
1110
using DragEventArgs = System.Windows.DragEventArgs;
@@ -19,9 +18,6 @@ public partial class ExplorerSettings
1918
{
2019
private readonly SettingsViewModel viewModel;
2120

22-
private List<ActionKeywordModel> actionKeywordsListView;
23-
24-
2521
public ExplorerSettings(SettingsViewModel viewModel)
2622
{
2723
DataContext = viewModel;
@@ -39,8 +35,6 @@ public ExplorerSettings(SettingsViewModel viewModel)
3935
lbxExcludedPaths.Items.SortDescriptions.Add(new SortDescription("Path", ListSortDirection.Ascending));
4036
}
4137

42-
43-
4438
private void AccessLinkDragDrop(string containerName, DragEventArgs e)
4539
{
4640
var files = (string[])e.Data.GetData(DataFormats.FileDrop);

0 commit comments

Comments
 (0)