mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Added search by hash to Searchbar
This commit is contained in:
parent
b250a89684
commit
bef69012b2
@ -38,9 +38,15 @@ namespace Wabbajack
|
||||
.DistinctUntilChanged()
|
||||
.Select(term =>
|
||||
{
|
||||
return string.IsNullOrWhiteSpace(term)
|
||||
? Archives
|
||||
: Archives.Where(x => x.Name.StartsWith(term));
|
||||
if (string.IsNullOrWhiteSpace(term))
|
||||
return Archives;
|
||||
|
||||
return Archives.Where(x =>
|
||||
{
|
||||
if (term.StartsWith("hash:"))
|
||||
return x.Hash.StartsWith(term.Replace("hash:", ""));
|
||||
return x.Name.StartsWith(term);
|
||||
});
|
||||
})
|
||||
.ToGuiProperty(this, nameof(SearchResults), Archives);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user