Skip to content

Commit 548435b

Browse files
committed
Improve code quality
1 parent b18d0a8 commit 548435b

File tree

2 files changed

+8
-38
lines changed

2 files changed

+8
-38
lines changed

Plugins/Flow.Launcher.Plugin.BrowserBookmark/Flow.Launcher.Plugin.BrowserBookmark.csproj

Lines changed: 3 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -37,41 +37,11 @@
3737
</PropertyGroup>
3838

3939
<Target Name="RemoveUnnecessaryRuntimesAfterBuild" AfterTargets="Build">
40-
<RemoveDir Directories="$(OutputPath)runtimes\browser-wasm;
41-
$(OutputPath)runtimes\linux-arm;
42-
$(OutputPath)runtimes\linux-arm64;
43-
$(OutputPath)runtimes\linux-armel;
44-
$(OutputPath)runtimes\linux-mips64;
45-
$(OutputPath)runtimes\linux-musl-arm;
46-
$(OutputPath)runtimes\linux-musl-arm64;
47-
$(OutputPath)runtimes\linux-musl-x64;
48-
$(OutputPath)runtimes\linux-ppc64le;
49-
$(OutputPath)runtimes\linux-s390x;
50-
$(OutputPath)runtimes\linux-x64;
51-
$(OutputPath)runtimes\linux-x86;
52-
$(OutputPath)runtimes\maccatalyst-arm64;
53-
$(OutputPath)runtimes\maccatalyst-x64;
54-
$(OutputPath)runtimes\osx-arm64;
55-
$(OutputPath)runtimes\osx-x64"/>
40+
<RemoveDir Directories="$(OutputPath)runtimes\browser-wasm;&#xD;&#xA; $(OutputPath)runtimes\linux-arm;&#xD;&#xA; $(OutputPath)runtimes\linux-arm64;&#xD;&#xA; $(OutputPath)runtimes\linux-armel;&#xD;&#xA; $(OutputPath)runtimes\linux-mips64;&#xD;&#xA; $(OutputPath)runtimes\linux-musl-arm;&#xD;&#xA; $(OutputPath)runtimes\linux-musl-arm64;&#xD;&#xA; $(OutputPath)runtimes\linux-musl-x64;&#xD;&#xA; $(OutputPath)runtimes\linux-ppc64le;&#xD;&#xA; $(OutputPath)runtimes\linux-s390x;&#xD;&#xA; $(OutputPath)runtimes\linux-x64;&#xD;&#xA; $(OutputPath)runtimes\linux-x86;&#xD;&#xA; $(OutputPath)runtimes\maccatalyst-arm64;&#xD;&#xA; $(OutputPath)runtimes\maccatalyst-x64;&#xD;&#xA; $(OutputPath)runtimes\osx-arm64;&#xD;&#xA; $(OutputPath)runtimes\osx-x64" />
5641
</Target>
5742

5843
<Target Name="RemoveUnnecessaryRuntimesAfterPublish" AfterTargets="Publish">
59-
<RemoveDir Directories="$(PublishDir)runtimes\browser-wasm;
60-
$(PublishDir)runtimes\linux-arm;
61-
$(PublishDir)runtimes\linux-arm64;
62-
$(PublishDir)runtimes\linux-armel;
63-
$(PublishDir)runtimes\linux-mips64;
64-
$(PublishDir)runtimes\linux-musl-arm;
65-
$(PublishDir)runtimes\linux-musl-arm64;
66-
$(PublishDir)runtimes\linux-musl-x64;
67-
$(PublishDir)runtimes\linux-ppc64le;
68-
$(PublishDir)runtimes\linux-s390x;
69-
$(PublishDir)runtimes\linux-x64;
70-
$(PublishDir)runtimes\linux-x86;
71-
$(PublishDir)runtimes\maccatalyst-arm64;
72-
$(PublishDir)runtimes\maccatalyst-x64;
73-
$(PublishDir)runtimes\osx-arm64;
74-
$(PublishDir)runtimes\osx-x64"/>
44+
<RemoveDir Directories="$(PublishDir)runtimes\browser-wasm;&#xD;&#xA; $(PublishDir)runtimes\linux-arm;&#xD;&#xA; $(PublishDir)runtimes\linux-arm64;&#xD;&#xA; $(PublishDir)runtimes\linux-armel;&#xD;&#xA; $(PublishDir)runtimes\linux-mips64;&#xD;&#xA; $(PublishDir)runtimes\linux-musl-arm;&#xD;&#xA; $(PublishDir)runtimes\linux-musl-arm64;&#xD;&#xA; $(PublishDir)runtimes\linux-musl-x64;&#xD;&#xA; $(PublishDir)runtimes\linux-ppc64le;&#xD;&#xA; $(PublishDir)runtimes\linux-s390x;&#xD;&#xA; $(PublishDir)runtimes\linux-x64;&#xD;&#xA; $(PublishDir)runtimes\linux-x86;&#xD;&#xA; $(PublishDir)runtimes\maccatalyst-arm64;&#xD;&#xA; $(PublishDir)runtimes\maccatalyst-x64;&#xD;&#xA; $(PublishDir)runtimes\osx-arm64;&#xD;&#xA; $(PublishDir)runtimes\osx-x64" />
7545
</Target>
7646

7747
<ItemGroup>
@@ -95,6 +65,7 @@
9565
</ItemGroup>
9666

9767
<ItemGroup>
68+
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.0" />
9869
<PackageReference Include="Microsoft.Data.Sqlite" Version="9.0.3" />
9970
</ItemGroup>
10071

Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/SettingsControl.xaml.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
using System.Windows;
2-
using Flow.Launcher.Plugin.BrowserBookmark.Models;
32
using System.Windows.Input;
4-
using System.ComponentModel;
53
using System.Threading.Tasks;
4+
using CommunityToolkit.Mvvm.ComponentModel;
5+
using Flow.Launcher.Plugin.BrowserBookmark.Models;
66

77
namespace Flow.Launcher.Plugin.BrowserBookmark.Views;
88

9-
public partial class SettingsControl : INotifyPropertyChanged
9+
[INotifyPropertyChanged]
10+
public partial class SettingsControl
1011
{
1112
public Settings Settings { get; }
1213
public CustomBrowser SelectedCustomBrowser { get; set; }
@@ -53,12 +54,10 @@ public bool OpenInNewBrowserWindow
5354
set
5455
{
5556
Settings.OpenInNewBrowserWindow = value;
56-
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(OpenInNewBrowserWindow)));
57+
OnPropertyChanged();
5758
}
5859
}
5960

60-
public event PropertyChangedEventHandler PropertyChanged;
61-
6261
private void NewCustomBrowser(object sender, RoutedEventArgs e)
6362
{
6463
var newBrowser = new CustomBrowser();

0 commit comments

Comments
 (0)