Fix for modlist images not clearing if N/A

This commit is contained in:
Justin Swanson 2019-12-14 14:33:26 -06:00
parent 078b457857
commit dee09f17d4

View File

@ -219,8 +219,8 @@ namespace Wabbajack
_image = Observable.CombineLatest(
this.WhenAny(x => x.ModList.Error),
this.WhenAny(x => x.ModList)
.SelectMany(x => x?.ImageObservable ?? Observable.Empty<BitmapImage>())
.NotNull()
.Select(x => x?.ImageObservable ?? Observable.Empty<BitmapImage>())
.Switch()
.StartWith(WabbajackLogo),
this.WhenAny(x => x.Slideshow.Image)
.StartWith(default(BitmapImage)),
@ -231,7 +231,8 @@ namespace Wabbajack
{
return WabbajackErrLogo;
}
return installing ? slideshow : modList;
var ret = installing ? slideshow : modList;
return ret ?? WabbajackLogo;
})
.Select<BitmapImage, ImageSource>(x => x)
.ToProperty(this, nameof(Image));