mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
FilePickerVM optimization for initial values
Was debouncing off its initial value of null, so any initial value set by settings wouldn't take immediate effect until later.
This commit is contained in:
parent
f8366c838a
commit
fd94df0f10
@ -77,7 +77,9 @@ namespace Wabbajack
|
||||
this.WhenAny(x => x.DoExistsCheck),
|
||||
this.WhenAny(x => x.PathType),
|
||||
this.WhenAny(x => x.TargetPath)
|
||||
.Throttle(TimeSpan.FromMilliseconds(200)),
|
||||
// Dont want to debounce the initial value, because we know it's null
|
||||
.Skip(1)
|
||||
.Debounce(TimeSpan.FromMilliseconds(200)),
|
||||
resultSelector: (_, DoExists, Type, Path) => (DoExists, Type, Path))
|
||||
// Refresh exists
|
||||
.Select(t =>
|
||||
@ -95,6 +97,7 @@ namespace Wabbajack
|
||||
return true;
|
||||
}
|
||||
})
|
||||
.StartWith(false)
|
||||
.DistinctUntilChanged()
|
||||
.ObserveOn(RxApp.MainThreadScheduler)
|
||||
.ToProperty(this, nameof(this.Exists));
|
||||
|
Loading…
Reference in New Issue
Block a user