Skip to content

Commit e500b35

Browse files
onesoundsjjw24
andauthored
Apply suggestions from code review
Co-authored-by: Jeremy Wu <[email protected]>
1 parent 4525043 commit e500b35

File tree

5 files changed

+4
-9
lines changed

5 files changed

+4
-9
lines changed

Flow.Launcher.Infrastructure/UserSettings/Settings.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ public CustomExplorerViewModel CustomExplorer
8585
public bool UseAnimation { get; set; } = true;
8686
public bool UseSound { get; set; } = true;
8787

88-
8988
/// <summary>
9089
/// when false Alphabet static service will always return empty results
9190
/// </summary>

Flow.Launcher/Flow.Launcher.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@
7777
<SubType>Designer</SubType>
7878
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
7979
</Content>
80-
<None Remove="Resources\open.wav" />
8180
<Content Include="Resources\Segoe Fluent Icons.ttf">
8281
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
8382
</Content>

Flow.Launcher/MainWindow.xaml.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,6 @@ public void WindowAnimator()
274274
}
275275
}
276276

277-
278277
private void OnMouseDown(object sender, MouseButtonEventArgs e)
279278
{
280279
if (e.ChangedButton == MouseButton.Left) DragMove();
@@ -318,7 +317,9 @@ private async void OnContextMenusForSettingsClick(object sender, RoutedEventArgs
318317
private async void OnDeactivated(object sender, EventArgs e)
319318
{
320319
_viewModel.Save();
321-
await Task.Delay(100);
320+
// need time to initialize the main query window animation
321+
if (_settings.UseAnimation)
322+
await Task.Delay(100);
322323
if (_settings.HideWhenDeactive)
323324
{
324325
_viewModel.Hide();
@@ -339,11 +340,9 @@ private void UpdatePosition()
339340
{
340341
Left = WindowLeft();
341342
Top = WindowTop();
342-
343343
}
344344
}
345345

346-
347346
private void OnLocationChanged(object sender, EventArgs e)
348347
{
349348
if (_animating)
@@ -366,7 +365,6 @@ public void HideStartup()
366365
{
367366
_viewModel.Show();
368367
}
369-
370368
}
371369

372370
public double WindowLeft()

Flow.Launcher/SettingWindow.xaml.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ private void OnLoaded(object sender, RoutedEventArgs e)
4444
HwndSource hwndSource = PresentationSource.FromVisual(this) as HwndSource;
4545
HwndTarget hwndTarget = hwndSource.CompositionTarget;
4646
hwndTarget.RenderMode = RenderMode.SoftwareOnly;
47-
4847
}
4948

5049
private void OnAutoStartupChecked(object sender, RoutedEventArgs e)

Flow.Launcher/ViewModel/MainViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -758,9 +758,9 @@ public async void Hide()
758758
default:
759759
throw new ArgumentException($"wrong LastQueryMode: <{_settings.LastQueryMode}>");
760760
}
761+
761762
WinToggleStatus = false;
762763
MainWindowVisibility = Visibility.Collapsed;
763-
764764
}
765765

766766
#endregion

0 commit comments

Comments
 (0)