mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Refactor a little more of the modlist size slider
This commit is contained in:
parent
c29bace800
commit
2221ad4c55
@ -175,24 +175,18 @@ namespace Wabbajack
|
||||
})
|
||||
.StartWith(_ => true);
|
||||
|
||||
var minSizeFilter = this.ObservableForProperty(vm => vm.MinModlistSize)
|
||||
var minModlistSizeFilter = this.ObservableForProperty(vm => vm.MinModlistSize)
|
||||
.Select(v => v.Value)
|
||||
.Select<double, Func<ModListMetadataVM, bool>>(minSize =>
|
||||
.Select<double, Func<ModListMetadataVM, bool>>(minModlistSize =>
|
||||
{
|
||||
return item =>
|
||||
{
|
||||
return item.Metadata.DownloadMetadata.TotalSize >= minSize;
|
||||
};
|
||||
return item => item.Metadata.DownloadMetadata.TotalSize >= minModlistSize;
|
||||
});
|
||||
|
||||
var maxSizeFilter = this.ObservableForProperty(vm => vm.MaxModlistSize)
|
||||
var maxModlistSizeFilter = this.ObservableForProperty(vm => vm.MaxModlistSize)
|
||||
.Select(v => v.Value)
|
||||
.Select<double, Func<ModListMetadataVM, bool>>(maxSize =>
|
||||
{
|
||||
return item =>
|
||||
{
|
||||
return item.Metadata.DownloadMetadata.TotalSize <= maxSize;
|
||||
};
|
||||
return item => item.Metadata.DownloadMetadata.TotalSize <= maxSize;
|
||||
});
|
||||
|
||||
|
||||
@ -209,8 +203,8 @@ namespace Wabbajack
|
||||
.Filter(showUnofficial)
|
||||
.Filter(showNSFWFilter)
|
||||
.Filter(gameFilter)
|
||||
.Filter(minSizeFilter)
|
||||
.Filter(maxSizeFilter)
|
||||
.Filter(minModlistSizeFilter)
|
||||
.Filter(maxModlistSizeFilter)
|
||||
.Sort(searchSorter)
|
||||
.TreatMovesAsRemoveAdd()
|
||||
.Bind(out _filteredModLists)
|
||||
|
Loading…
Reference in New Issue
Block a user