whitespace changes (#5750)

This commit is contained in:
Clint Rutkas
2020-08-06 20:38:49 -07:00
committed by GitHub
parent b815718c26
commit 26bf05dd7e
16 changed files with 37 additions and 23 deletions

View File

@@ -52,7 +52,6 @@ namespace PowerLauncher.ViewModel
PluginName = PluginName,
Trigger = triggerType.ToString(),
ActionName = Title
};
PowerToysTelemetry.Log.WriteEvent(eventData);
}

View File

@@ -260,6 +260,7 @@ namespace PowerLauncher.ViewModel
if (!string.IsNullOrEmpty(QueryText))
{
ChangeQueryText(string.Empty, true);
// Push Event to UI SystemQuery has changed
OnPropertyChanged(nameof(SystemQueryText));
}
@@ -337,6 +338,7 @@ namespace PowerLauncher.ViewModel
QueryText = string.Empty;
}
}
_selectedResults.Visibility = Visibility.Visible;
}
}
@@ -360,7 +362,6 @@ namespace PowerLauncher.ViewModel
{
PowerToysTelemetry.Log.WriteEvent(new LauncherHideEvent());
}
}
}
@@ -535,7 +536,6 @@ namespace PowerLauncher.ViewModel
QueryLength = query.RawQuery.Length
};
PowerToysTelemetry.Log.WriteEvent(queryEvent);
}, currentCancellationToken);
}
}
@@ -660,6 +660,7 @@ namespace PowerLauncher.ViewModel
{
StartHotkeyTimer();
}
if (_settings.LastQueryMode == LastQueryMode.Empty)
{
ChangeQueryText(string.Empty);
@@ -772,7 +773,9 @@ namespace PowerLauncher.ViewModel
{
var _ = PluginManager.QueryForPlugin(plugin, query);
}
};
}
;
}
public void HandleContextMenu(Key AcceleratorKey, ModifierKeys AcceleratorModifiers)
@@ -819,6 +822,7 @@ namespace PowerLauncher.ViewModel
return query + input.Substring(query.Length);
}
}
return input;
}
@@ -849,6 +853,7 @@ namespace PowerLauncher.ViewModel
{
_hotkeyManager?.UnregisterHotkey(_hotkeyHandle);
}
_hotkeyManager?.Dispose();
_updateSource?.Dispose();
_disposed = true;

View File

@@ -20,7 +20,7 @@ namespace PowerLauncher.ViewModel
{
Selection,
Hover
};
}
public ObservableCollection<ContextMenuItemViewModel> ContextMenuItems { get; } = new ObservableCollection<ContextMenuItemViewModel>();

View File

@@ -23,8 +23,8 @@ namespace PowerLauncher.ViewModel
private readonly object _collectionLock = new object();
private readonly Settings _settings;
// private int MaxResults => _settings?.MaxResultsToShow ?? 6;
// private int MaxResults => _settings?.MaxResultsToShow ?? 6;
public ResultsViewModel()
{
Results = new ResultCollection();
@@ -105,6 +105,7 @@ namespace PowerLauncher.ViewModel
break;
}
}
return index;
}
@@ -189,9 +190,9 @@ namespace PowerLauncher.ViewModel
public void SelectNextContextMenuItem()
{
if(SelectedItem != null)
if (SelectedItem != null)
{
if(!SelectedItem.SelectNextContextButton())
if (!SelectedItem.SelectNextContextButton())
{
SelectedItem.SelectLastContextButton();
}
@@ -229,7 +230,7 @@ namespace PowerLauncher.ViewModel
}
List<ResultViewModel> newResults = new List<ResultViewModel>(newRawResults.Count);
foreach(Result r in newRawResults)
foreach (Result r in newRawResults)
{
newResults.Add(new ResultViewModel(r));
ct.ThrowIfCancellationRequested();