Skip to content

Commit b1eb191

Browse files
Formatting
1 parent 5de74c4 commit b1eb191

File tree

3 files changed

+21
-11
lines changed

3 files changed

+21
-11
lines changed

Flow.Launcher/MainWindow.xaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,10 @@
8686
Key="O"
8787
Command="{Binding LoadContextMenuCommand}"
8888
Modifiers="Ctrl" />
89-
<KeyBinding Key="Right" Command="{Binding LoadContextMenuCommand}" />
90-
<KeyBinding Key="Left" Command="{Binding EscCommand}" />
9189
<KeyBinding
9290
Key="H"
9391
Command="{Binding LoadHistoryCommand}"
9492
Modifiers="Ctrl" />
95-
<KeyBinding Key="Right" Command="{Binding LoadContextMenuCommand}" />
96-
<KeyBinding Key="Left" Command="{Binding EscCommand}" />
9793
<KeyBinding
9894
Key="OemCloseBrackets"
9995
Command="{Binding IncreaseWidthCommand}"

Flow.Launcher/MainWindow.xaml.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ private void OnCopy(object sender, ExecutedRoutedEventArgs e)
7070
_viewModel.ResultCopy(QueryTextBox.SelectedText);
7171
}
7272
}
73+
7374
private async void OnClosing(object sender, CancelEventArgs e)
7475
{
7576
_settings.WindowTop = Top;
@@ -324,11 +325,13 @@ private void CheckFirstLaunch()
324325
OpenWelcomeWindow();
325326
}
326327
}
328+
327329
private void OpenWelcomeWindow()
328330
{
329331
var WelcomeWindow = new WelcomeWindow(_settings);
330332
WelcomeWindow.Show();
331333
}
334+
332335
private void ToggleGameMode()
333336
{
334337
if (_viewModel.GameModeStatus)
@@ -342,13 +345,15 @@ private void ToggleGameMode()
342345
_viewModel.GameModeStatus = true;
343346
}
344347
}
348+
345349
private async void PositionReset()
346350
{
347351
_viewModel.Show();
348352
await Task.Delay(300); // If don't give a time, Positioning will be weird.
349353
Left = HorizonCenter();
350354
Top = VerticalCenter();
351355
}
356+
352357
private void InitProgressbarAnimation()
353358
{
354359
var da = new DoubleAnimation(ProgressBar.X2, ActualWidth + 100, new Duration(new TimeSpan(0, 0, 0, 0, 1600)));
@@ -361,6 +366,7 @@ private void InitProgressbarAnimation()
361366
_viewModel.ProgressBarVisibility = Visibility.Hidden;
362367
isProgressBarStoryboardPaused = true;
363368
}
369+
364370
public void WindowAnimator()
365371
{
366372
if (_animating)
@@ -475,7 +481,6 @@ private async void OnContextMenusForSettingsClick(object sender, RoutedEventArgs
475481
App.API.OpenSettingDialog();
476482
}
477483

478-
479484
private async void OnDeactivated(object sender, EventArgs e)
480485
{
481486
_settings.WindowLeft = Left;
@@ -644,6 +649,7 @@ public void PreviewReset()
644649
Preview.Visibility = Visibility.Collapsed;
645650
}
646651
}
652+
647653
public void PreviewToggle()
648654
{
649655

Flow.Launcher/ViewModel/MainViewModel.cs

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,6 @@ async Task updateAction()
135135
Log.Error("MainViewModel", "Unexpected ResultViewUpdate ends");
136136
}
137137

138-
;
139-
140138
void continueAction(Task t)
141139
{
142140
#if DEBUG
@@ -180,6 +178,7 @@ private async Task ReloadPluginDataAsync()
180178
await PluginManager.ReloadDataAsync().ConfigureAwait(false);
181179
Notification.Show(InternationalizationManager.Instance.GetTranslation("success"), InternationalizationManager.Instance.GetTranslation("completedSuccessfully"));
182180
}
181+
183182
[RelayCommand]
184183
private void LoadHistory()
185184
{
@@ -193,6 +192,7 @@ private void LoadHistory()
193192
SelectedResults = Results;
194193
}
195194
}
195+
196196
[RelayCommand]
197197
private void LoadContextMenu()
198198
{
@@ -208,6 +208,7 @@ private void LoadContextMenu()
208208
SelectedResults = Results;
209209
}
210210
}
211+
211212
[RelayCommand]
212213
private void Backspace(object index)
213214
{
@@ -220,6 +221,7 @@ private void Backspace(object index)
220221

221222
ChangeQueryText($"{actionKeyword}{path}");
222223
}
224+
223225
[RelayCommand]
224226
private void AutocompleteQuery()
225227
{
@@ -246,6 +248,7 @@ private void AutocompleteQuery()
246248
ChangeQueryText(autoCompleteText);
247249
}
248250
}
251+
249252
[RelayCommand]
250253
private async Task OpenResultAsync(string index)
251254
{
@@ -280,6 +283,7 @@ private async Task OpenResultAsync(string index)
280283
SelectedResults = Results;
281284
}
282285
}
286+
283287
[RelayCommand]
284288
private void OpenSetting()
285289
{
@@ -297,6 +301,7 @@ private void SelectFirstResult()
297301
{
298302
SelectedResults.SelectFirstResult();
299303
}
304+
300305
[RelayCommand]
301306
private void SelectPrevPage()
302307
{
@@ -308,11 +313,13 @@ private void SelectNextPage()
308313
{
309314
SelectedResults.SelectNextPage();
310315
}
316+
311317
[RelayCommand]
312318
private void SelectPrevItem()
313319
{
314320
SelectedResults.SelectPrevResult();
315321
}
322+
316323
[RelayCommand]
317324
private void SelectNextItem()
318325
{
@@ -520,6 +527,8 @@ public double MainWindowWidth
520527

521528
#endregion
522529

530+
#region Query
531+
523532
public void Query()
524533
{
525534
if (SelectedIsFromQueryResults())
@@ -873,6 +882,8 @@ private bool HistorySelected()
873882
return selected;
874883
}
875884

885+
#endregion
886+
876887
#region Hotkey
877888

878889
public void ToggleFlowLauncher()
@@ -928,9 +939,6 @@ public async void Hide()
928939
MainWindowVisibility = Visibility.Collapsed;
929940
}
930941

931-
#endregion
932-
933-
934942
/// <summary>
935943
/// Checks if Flow Launcher should ignore any hotkeys
936944
/// </summary>
@@ -939,7 +947,7 @@ public bool ShouldIgnoreHotkeys()
939947
return Settings.IgnoreHotkeysOnFullscreen && WindowsInteropHelper.IsWindowFullscreen();
940948
}
941949

942-
950+
#endregion
943951

944952
#region Public Methods
945953

0 commit comments

Comments
 (0)