mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Moved slideshow preloading logic into SlideshowVM
This commit is contained in:
parent
b24abd3187
commit
2048dfa0de
@ -182,17 +182,6 @@ namespace Wabbajack
|
||||
ModListName = this.ModList.Name;
|
||||
HTMLReport = this.ModList.ReportHTML;
|
||||
Location = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
|
||||
|
||||
this.Slideshow.SlideShowElements = modlist.Archives
|
||||
.Select(m => m.State)
|
||||
.OfType<NexusDownloader.State>()
|
||||
.Select(m =>
|
||||
new Slide(NexusApiUtils.FixupSummary(m.ModName),m.ModID,
|
||||
NexusApiUtils.FixupSummary(m.Summary), NexusApiUtils.FixupSummary(m.Author),
|
||||
m.Adult,m.NexusURL,m.SlideShowPic)).ToList();
|
||||
|
||||
|
||||
this.Slideshow.PreloadSlideShow();
|
||||
}
|
||||
|
||||
private void ExecuteBegin()
|
||||
|
@ -14,6 +14,7 @@ using System.Threading.Tasks;
|
||||
using System.Windows.Media.Imaging;
|
||||
using Wabbajack.Common;
|
||||
using Wabbajack.Lib;
|
||||
using Wabbajack.Lib.Downloaders;
|
||||
using Wabbajack.Lib.NexusApi;
|
||||
|
||||
namespace Wabbajack
|
||||
@ -83,12 +84,23 @@ namespace Wabbajack
|
||||
// Apply modlist properties when it changes
|
||||
this.WhenAny(x => x.Installer.ModList)
|
||||
.NotNull()
|
||||
.ObserveOnGuiThread()
|
||||
.Subscribe(modList =>
|
||||
{
|
||||
this.NexusSiteURL = modList.Website;
|
||||
this.ModName = modList.Name;
|
||||
this.AuthorName = modList.Author;
|
||||
this.Summary = modList.Description;
|
||||
|
||||
this.SlideShowElements = modList.Archives
|
||||
.Select(m => m.State)
|
||||
.OfType<NexusDownloader.State>()
|
||||
.Select(m =>
|
||||
new Slide(NexusApiUtils.FixupSummary(m.ModName), m.ModID,
|
||||
NexusApiUtils.FixupSummary(m.Summary), NexusApiUtils.FixupSummary(m.Author),
|
||||
m.Adult, m.NexusURL, m.SlideShowPic)).ToList();
|
||||
|
||||
this.PreloadSlideShow();
|
||||
})
|
||||
.DisposeWith(this.CompositeDisposable);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user