Rename MinSizeModlist, MaxSizeModlist to SmallestSizedModlist, LargestSizedModlist

This commit is contained in:
trawzified 2023-12-31 11:27:13 +01:00
parent ea59cd2e0e
commit 21678fff41
2 changed files with 6 additions and 6 deletions

View File

@ -49,8 +49,8 @@ namespace Wabbajack
[Reactive] public double MinModlistSize { get; set; }
[Reactive] public double MaxModlistSize { get; set; }
[Reactive] public ModListMetadataVM MinSizeModlist { get; set; }
[Reactive] public ModListMetadataVM MaxSizeModlist { get; set; }
[Reactive] public ModListMetadataVM SmallestSizedModlist { get; set; }
[Reactive] public ModListMetadataVM LargestSizedModlist { get; set; }
public class GameTypeEntry
{
@ -286,8 +286,8 @@ namespace Wabbajack
e.AddOrUpdate(modLists.Select(m =>
new ModListMetadataVM(_logger, this, m, _maintainer, _wjClient, _cancellationToken)));
});
MinSizeModlist = _modLists.Items.Any() ? _modLists.Items.MinBy(ml => ml.Metadata.DownloadMetadata.TotalSize) : null;
MaxSizeModlist = _modLists.Items.Any() ? _modLists.Items.MaxBy(ml => ml.Metadata.DownloadMetadata.TotalSize) : null;
SmallestSizedModlist = _modLists.Items.Any() ? _modLists.Items.MinBy(ml => ml.Metadata.DownloadMetadata.TotalSize) : null;
LargestSizedModlist = _modLists.Items.Any() ? _modLists.Items.MaxBy(ml => ml.Metadata.DownloadMetadata.TotalSize) : null;
}
catch (Exception ex)
{

View File

@ -19,13 +19,13 @@ namespace Wabbajack
.BindToStrict(this, x => x.ModListGalleryControl.ItemsSource)
.DisposeWith(dispose);
this.WhenAny(x => x.ViewModel.MinSizeModlist)
this.WhenAny(x => x.ViewModel.SmallestSizedModlist)
.Where(x => x != null)
.Select(x => x.Metadata.DownloadMetadata.TotalSize / Math.Pow(1024, 3))
.BindToStrict(this, x => x.SizeSliderFilter.Minimum)
.DisposeWith(dispose);
this.WhenAny(x => x.ViewModel.MaxSizeModlist)
this.WhenAny(x => x.ViewModel.LargestSizedModlist)
.Where(x => x != null)
.Select(x => x.Metadata.DownloadMetadata.TotalSize / Math.Pow(1024, 3))
.BindToStrict(this, x => x.SizeSliderFilter.Maximum)