mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Use auto deconstructor and rename return value
This commit is contained in:
parent
e720e4facd
commit
0afcf7eafe
2 changed files with 4 additions and 6 deletions
|
|
@ -29,9 +29,7 @@ namespace Flow.Launcher.Plugin.Program
|
|||
|
||||
private void BtnAdd_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var status = ViewModel.AddOrUpdate();
|
||||
bool modified = status.Item1;
|
||||
string msg = status.Item2;
|
||||
var (modified, msg) = ViewModel.AddOrUpdate();
|
||||
if (modified == false && msg != null)
|
||||
{
|
||||
MessageBox.Show(msg); // Invalid
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ namespace Flow.Launcher.Plugin.Program.ViewModels
|
|||
}
|
||||
}
|
||||
|
||||
public (bool, string) AddProgramSource()
|
||||
public (bool modified, string message) AddProgramSource()
|
||||
{
|
||||
if (!Directory.Exists(Location))
|
||||
{
|
||||
|
|
@ -86,7 +86,7 @@ namespace Flow.Launcher.Plugin.Program.ViewModels
|
|||
}
|
||||
}
|
||||
|
||||
public (bool, string) UpdateProgramSource()
|
||||
public (bool modified, string message) UpdateProgramSource()
|
||||
{
|
||||
if (LocationModified)
|
||||
{
|
||||
|
|
@ -110,7 +110,7 @@ namespace Flow.Launcher.Plugin.Program.ViewModels
|
|||
return (StatusModified || LocationModified, null);
|
||||
}
|
||||
|
||||
public (bool, string) AddOrUpdate()
|
||||
public (bool modified, string message) AddOrUpdate()
|
||||
{
|
||||
if (Source == null)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue