Skip to content

Commit b6bf93e

Browse files
committed
Implement filtering of upgradable apps
1 parent 9f7927c commit b6bf93e

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

Main.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,12 @@ public async Task<List<Result>> QueryAsync(Query query, CancellationToken token)
6565
};
6666
}
6767

68+
string filterTerm = query.Search?.Trim().ToLower();
69+
6870
return upgradableApps.AsParallel()
6971
.WithDegreeOfParallelism(Environment.ProcessorCount)
72+
.Where(app => string.IsNullOrEmpty(filterTerm) ||
73+
app.Name.ToLower().Contains(filterTerm))
7074
.Select(app => new Result
7175
{
7276
Title = $"Upgrade {app.Name}",
@@ -87,7 +91,8 @@ public async Task<List<Result>> QueryAsync(Query query, CancellationToken token)
8791
return true;
8892
},
8993
IcoPath = "Images\\app.png"
90-
}).ToList();
94+
})
95+
.ToList();
9196
}
9297

9398

plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"Name": "AppUpgrader",
55
"Description": "Allows you to keep your applications up using winget",
66
"Author": "Exarilo",
7-
"Version": "1.0.9",
7+
"Version": "1.1.0",
88
"Language": "csharp",
99
"Website": "https://github.com/Exarilo/Flow.Launcher.Plugin.AppUpgrader",
1010
"IcoPath": "Images\\app.png",

0 commit comments

Comments
 (0)