Apply suggestions from code review

Co-authored-by: Jeremy Wu <jeremy24wu@gmail.com>
This commit is contained in:
Dobin Park 2021-11-19 14:24:28 +09:00 committed by GitHub
parent 45250437fd
commit e500b3517d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 4 additions and 9 deletions

View file

@ -85,7 +85,6 @@ namespace Flow.Launcher.Infrastructure.UserSettings
public bool UseAnimation { get; set; } = true;
public bool UseSound { get; set; } = true;
/// <summary>
/// when false Alphabet static service will always return empty results
/// </summary>

View file

@ -77,7 +77,6 @@
<SubType>Designer</SubType>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<None Remove="Resources\open.wav" />
<Content Include="Resources\Segoe Fluent Icons.ttf">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>

View file

@ -274,7 +274,6 @@ namespace Flow.Launcher
}
}
private void OnMouseDown(object sender, MouseButtonEventArgs e)
{
if (e.ChangedButton == MouseButton.Left) DragMove();
@ -318,7 +317,9 @@ namespace Flow.Launcher
private async void OnDeactivated(object sender, EventArgs e)
{
_viewModel.Save();
await Task.Delay(100);
// need time to initialize the main query window animation
if (_settings.UseAnimation)
await Task.Delay(100);
if (_settings.HideWhenDeactive)
{
_viewModel.Hide();
@ -339,11 +340,9 @@ namespace Flow.Launcher
{
Left = WindowLeft();
Top = WindowTop();
}
}
private void OnLocationChanged(object sender, EventArgs e)
{
if (_animating)
@ -366,7 +365,6 @@ namespace Flow.Launcher
{
_viewModel.Show();
}
}
public double WindowLeft()

View file

@ -44,7 +44,6 @@ namespace Flow.Launcher
HwndSource hwndSource = PresentationSource.FromVisual(this) as HwndSource;
HwndTarget hwndTarget = hwndSource.CompositionTarget;
hwndTarget.RenderMode = RenderMode.SoftwareOnly;
}
private void OnAutoStartupChecked(object sender, RoutedEventArgs e)

View file

@ -758,9 +758,9 @@ namespace Flow.Launcher.ViewModel
default:
throw new ArgumentException($"wrong LastQueryMode: <{_settings.LastQueryMode}>");
}
WinToggleStatus = false;
MainWindowVisibility = Visibility.Collapsed;
}
#endregion