Skip to content

Commit 0afcf7e

Browse files
Use auto deconstructor and rename return value
1 parent e720e4f commit 0afcf7e

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

Plugins/Flow.Launcher.Plugin.Program/AddProgramSource.xaml.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ private void BtnCancel_OnClick(object sender, RoutedEventArgs e)
2929

3030
private void BtnAdd_OnClick(object sender, RoutedEventArgs e)
3131
{
32-
var status = ViewModel.AddOrUpdate();
33-
bool modified = status.Item1;
34-
string msg = status.Item2;
32+
var (modified, msg) = ViewModel.AddOrUpdate();
3533
if (modified == false && msg != null)
3634
{
3735
MessageBox.Show(msg); // Invalid

Plugins/Flow.Launcher.Plugin.Program/ViewModels/AddProgramSourceViewModel.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public void Browse()
6767
}
6868
}
6969

70-
public (bool, string) AddProgramSource()
70+
public (bool modified, string message) AddProgramSource()
7171
{
7272
if (!Directory.Exists(Location))
7373
{
@@ -86,7 +86,7 @@ public void Browse()
8686
}
8787
}
8888

89-
public (bool, string) UpdateProgramSource()
89+
public (bool modified, string message) UpdateProgramSource()
9090
{
9191
if (LocationModified)
9292
{
@@ -110,7 +110,7 @@ public void Browse()
110110
return (StatusModified || LocationModified, null);
111111
}
112112

113-
public (bool, string) AddOrUpdate()
113+
public (bool modified, string message) AddOrUpdate()
114114
{
115115
if (Source == null)
116116
{

0 commit comments

Comments
 (0)