Skip to content

Commit 6963972

Browse files
Merge branch 'dev' into everything_update_runcount
2 parents 78cb45c + 2093784 commit 6963972

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

Flow.Launcher/MainWindow.xaml.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
using System.Windows.Data;
2525
using ModernWpf.Controls;
2626
using Key = System.Windows.Input.Key;
27+
using System.Media;
2728

2829
namespace Flow.Launcher
2930
{
@@ -37,8 +38,8 @@ public partial class MainWindow
3738
private NotifyIcon _notifyIcon;
3839
private ContextMenu contextMenu;
3940
private MainViewModel _viewModel;
40-
private readonly MediaPlayer animationSound = new();
4141
private bool _animating;
42+
SoundPlayer animationSound = new SoundPlayer(AppDomain.CurrentDomain.BaseDirectory + "Resources\\open.wav");
4243

4344
#endregion
4445

@@ -49,8 +50,7 @@ public MainWindow(Settings settings, MainViewModel mainVM)
4950
_settings = settings;
5051

5152
InitializeComponent();
52-
InitializePosition();
53-
animationSound.Open(new Uri(AppDomain.CurrentDomain.BaseDirectory + "Resources\\open.wav"));
53+
InitializePosition();
5454
}
5555

5656
public MainWindow()
@@ -114,7 +114,6 @@ private void OnLoaded(object sender, RoutedEventArgs _)
114114
{
115115
if (_settings.UseSound)
116116
{
117-
animationSound.Position = TimeSpan.Zero;
118117
animationSound.Play();
119118
}
120119
UpdatePosition();

Flow.Launcher/ViewModel/PluginStoreItemViewModel.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,19 @@ public PluginStoreItemViewModel(UserPlugin plugin)
2626
public string IcoPath => _plugin.IcoPath;
2727

2828
public bool LabelInstalled => PluginManager.GetPluginForId(_plugin.ID) != null;
29-
public bool LabelUpdate => LabelInstalled && _plugin.Version != PluginManager.GetPluginForId(_plugin.ID).Metadata.Version;
29+
public bool LabelUpdate => LabelInstalled && VersionConvertor(_plugin.Version) > VersionConvertor(PluginManager.GetPluginForId(_plugin.ID).Metadata.Version);
3030

3131
internal const string None = "None";
3232
internal const string RecentlyUpdated = "RecentlyUpdated";
3333
internal const string NewRelease = "NewRelease";
3434
internal const string Installed = "Installed";
3535

36+
public Version VersionConvertor(string version)
37+
{
38+
Version ResultVersion = new Version(version);
39+
return ResultVersion;
40+
}
41+
3642
public string Category
3743
{
3844
get

0 commit comments

Comments
 (0)