Skip to content

Commit c2eca7d

Browse files
committed
Improve code quality
1 parent 6cd830c commit c2eca7d

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

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

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,17 @@ namespace Flow.Launcher.Plugin.Explorer.Views
1414
{
1515
public partial class ExplorerSettings
1616
{
17-
private readonly SettingsViewModel viewModel;
18-
private List<Expander> _expanders;
17+
private readonly SettingsViewModel _viewModel;
18+
private readonly List<Expander> _expanders;
1919

2020
public ExplorerSettings(SettingsViewModel viewModel)
2121
{
22+
_viewModel = viewModel;
2223
DataContext = viewModel;
24+
2325
InitializeComponent();
24-
this.viewModel = viewModel;
25-
// DataContext = viewModel; // Removed duplicate
26+
27+
DataContext = viewModel;
2628

2729
ActionKeywordModel.Init(viewModel.Settings);
2830

@@ -63,7 +65,7 @@ private void AccessLinkDragDrop(string containerName, DragEventArgs e)
6365
{
6466
Path = s
6567
};
66-
viewModel.AppendLink(containerName, newFolderLink);
68+
_viewModel.AppendLink(containerName, newFolderLink);
6769
}
6870
}
6971
}
@@ -88,8 +90,8 @@ private void EverythingSortOptionChanged(object sender, SelectionChangedEventArg
8890
{
8991
if (tbFastSortWarning is not null)
9092
{
91-
tbFastSortWarning.Visibility = viewModel.FastSortWarningVisibility;
92-
tbFastSortWarning.Text = viewModel.SortOptionWarningMessage;
93+
tbFastSortWarning.Visibility = _viewModel.FastSortWarningVisibility;
94+
tbFastSortWarning.Text = _viewModel.SortOptionWarningMessage;
9395
}
9496
}
9597
private void LbxAccessLinks_OnDrop(object sender, DragEventArgs e)

0 commit comments

Comments
 (0)