mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Remove DisabledProgramSource()
This commit is contained in:
parent
db67d3b925
commit
4da7a5e078
3 changed files with 3 additions and 30 deletions
|
|
@ -204,16 +204,7 @@ namespace Flow.Launcher.Plugin.Program
|
|||
_win32s.FirstOrDefault(x => x.UniqueIdentifier == programToDelete.UniqueIdentifier)
|
||||
.Enabled = false;
|
||||
|
||||
_settings.DisabledProgramSources
|
||||
.Add(
|
||||
new DisabledProgramSource
|
||||
{
|
||||
Name = programToDelete.Name,
|
||||
Location = programToDelete.Location,
|
||||
UniqueIdentifier = programToDelete.UniqueIdentifier,
|
||||
Enabled = false
|
||||
}
|
||||
);
|
||||
_settings.DisabledProgramSources.Add(new DisabledProgramSource(programToDelete));
|
||||
}
|
||||
|
||||
public static void StartProcess(Func<ProcessStartInfo, Process> runProcess, ProcessStartInfo info)
|
||||
|
|
|
|||
|
|
@ -107,15 +107,7 @@ namespace Flow.Launcher.Plugin.Program.Views.Commands
|
|||
&& !Main._settings.DisabledProgramSources.Any(x => x.UniqueIdentifier == t1.UniqueIdentifier))
|
||||
.ToList()
|
||||
.ForEach(x => Main._settings.DisabledProgramSources
|
||||
.Add(
|
||||
new DisabledProgramSource
|
||||
{
|
||||
Name = x.Name,
|
||||
Location = x.Location,
|
||||
UniqueIdentifier = x.UniqueIdentifier,
|
||||
Enabled = false
|
||||
}
|
||||
));
|
||||
.Add(new DisabledProgramSource(x)));
|
||||
}
|
||||
|
||||
internal static void RemoveDisabledFromSettings(this List<ProgramSource> list)
|
||||
|
|
|
|||
|
|
@ -68,16 +68,6 @@ namespace Flow.Launcher.Plugin.Program.Views.Models
|
|||
return program != null && program.UniqueIdentifier == this.UniqueIdentifier;
|
||||
}
|
||||
|
||||
public static bool operator ==(ProgramSource a, ProgramSource b)
|
||||
{
|
||||
return a is not null && a.Equals(b);
|
||||
}
|
||||
|
||||
public static bool operator !=(ProgramSource a, ProgramSource b)
|
||||
{
|
||||
return !(a == b);
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return HashCode.Combine(uid);
|
||||
|
|
@ -86,7 +76,7 @@ namespace Flow.Launcher.Plugin.Program.Views.Models
|
|||
|
||||
public class DisabledProgramSource : ProgramSource
|
||||
{
|
||||
public DisabledProgramSource() { }
|
||||
//public DisabledProgramSource() { }
|
||||
|
||||
public DisabledProgramSource(string location) : base(location, false) { }
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue