Skip to content

Commit 58317b7

Browse files
committed
rename showSound to animationSound
1 parent 6510671 commit 58317b7

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

Flow.Launcher/App.xaml.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ await Stopwatch.NormalAsync("|App.OnStartup|Startup cost", async () =>
6969
PluginManager.LoadPlugins(_settings.PluginSettings);
7070
_mainVM = new MainViewModel(_settings);
7171

72-
7372
API = new PublicAPIInstance(_settingsVM, _mainVM, _alphabet);
7473

7574
Http.API = API;
@@ -78,7 +77,6 @@ await Stopwatch.NormalAsync("|App.OnStartup|Startup cost", async () =>
7877
await PluginManager.InitializePlugins(API);
7978
var window = new MainWindow(_settings, _mainVM);
8079

81-
8280
Log.Info($"|App.OnStartup|Dependencies Info:{ErrorReporting.DependenciesInfo()}");
8381

8482
Current.MainWindow = window;

Flow.Launcher/MainWindow.xaml.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public partial class MainWindow
3131
private NotifyIcon _notifyIcon;
3232
private ContextMenu contextMenu;
3333
private MainViewModel _viewModel;
34-
private readonly MediaPlayer showSound = new();
34+
private readonly MediaPlayer animationSound = new();
3535
private bool _animating;
3636

3737
#endregion
@@ -43,7 +43,7 @@ public MainWindow(Settings settings, MainViewModel mainVM)
4343
_settings = settings;
4444
InitializeComponent();
4545
InitializePosition();
46-
showSound.Open(new Uri(AppDomain.CurrentDomain.BaseDirectory + "Resources\\open.wav"));
46+
animationSound.Open(new Uri(AppDomain.CurrentDomain.BaseDirectory + "Resources\\open.wav"));
4747
}
4848

4949
public MainWindow()
@@ -89,8 +89,8 @@ private void OnLoaded(object sender, RoutedEventArgs _)
8989
{
9090
if (_settings.UseSound)
9191
{
92-
showSound.Position = TimeSpan.Zero;
93-
showSound.Play();
92+
animationSound.Position = TimeSpan.Zero;
93+
animationSound.Play();
9494
}
9595

9696
UpdatePosition();
@@ -108,6 +108,7 @@ private void OnLoaded(object sender, RoutedEventArgs _)
108108
_progressBarStoryboard.Begin(ProgressBar, true);
109109
isProgressBarStoryboardPaused = false;
110110
}
111+
111112
if(_settings.UseAnimation)
112113
WindowAnimator();
113114
}

Flow.Launcher/ViewModel/MainViewModel.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
using System.Threading;
55
using System.Threading.Tasks;
66
using System.Windows;
7-
using System.Windows.Media;
87
using System.Windows.Input;
98
using Flow.Launcher.Core.Plugin;
109
using Flow.Launcher.Core.Resource;
@@ -14,7 +13,6 @@
1413
using Flow.Launcher.Infrastructure.Storage;
1514
using Flow.Launcher.Infrastructure.UserSettings;
1615
using Flow.Launcher.Plugin;
17-
using Flow.Launcher.Plugin.SharedCommands;
1816
using Flow.Launcher.Storage;
1917
using Flow.Launcher.Infrastructure.Logger;
2018
using Microsoft.VisualStudio.Threading;

0 commit comments

Comments
 (0)