mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Slideshow logic modified to allow manual updates when not enabled
This means enable/disable only affects auto rollovers
This commit is contained in:
parent
b71d5c76a2
commit
b24abd3187
@ -139,17 +139,16 @@ namespace Wabbajack
|
|||||||
// Merge all the sources that trigger a slideshow update
|
// Merge all the sources that trigger a slideshow update
|
||||||
Observable.Merge(
|
Observable.Merge(
|
||||||
// If the natural timer fires
|
// If the natural timer fires
|
||||||
Observable.Interval(TimeSpan.FromSeconds(10)).Unit(),
|
Observable.Interval(TimeSpan.FromSeconds(10))
|
||||||
|
.Unit()
|
||||||
|
// Only if enabled
|
||||||
|
.FilterSwitch(this.WhenAny(x => x.Enable)),
|
||||||
// If user requests one manually
|
// If user requests one manually
|
||||||
this.SlideShowNextItemCommand.StartingExecution())
|
this.SlideShowNextItemCommand.StartingExecution())
|
||||||
// When enabled, fire an initial signal
|
// When installing fire an initial signal
|
||||||
.StartWith(Unit.Default)
|
.StartWith(Unit.Default)
|
||||||
// Only subscribe to slideshow triggers if enabled and installing
|
// Only subscribe to slideshow triggers if installing
|
||||||
.FilterSwitch(
|
.FilterSwitch(this.WhenAny(x => x.Installer.Installing))
|
||||||
Observable.CombineLatest(
|
|
||||||
this.WhenAny(x => x.Enable),
|
|
||||||
this.WhenAny(x => x.Installer.Installing),
|
|
||||||
resultSelector: (enabled, installing) => enabled && installing))
|
|
||||||
// Don't ever update more than once every half second. ToDo: Update to debounce
|
// Don't ever update more than once every half second. ToDo: Update to debounce
|
||||||
.Throttle(TimeSpan.FromMilliseconds(500), RxApp.MainThreadScheduler)
|
.Throttle(TimeSpan.FromMilliseconds(500), RxApp.MainThreadScheduler)
|
||||||
.ObserveOn(RxApp.MainThreadScheduler)
|
.ObserveOn(RxApp.MainThreadScheduler)
|
||||||
|
Loading…
Reference in New Issue
Block a user