mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
OpenReadmeCommand now only executable if UIReady
The function it calls shortcircuits if UIReady is false, so the command shouldn't be runnable if that's the state
This commit is contained in:
parent
d60d6a65a6
commit
ead583ac1d
@ -106,8 +106,11 @@ namespace Wabbajack
|
||||
this.OpenModListPropertiesCommand = ReactiveCommand.Create(OpenModListProperties);
|
||||
this.OpenReadmeCommand = ReactiveCommand.Create(
|
||||
execute: this.OpenReadmeWindow,
|
||||
canExecute: this.WhenAny(x => x.ModList)
|
||||
.Select(modList => !string.IsNullOrEmpty(modList?.Readme))
|
||||
canExecute: Observable.CombineLatest(
|
||||
this.WhenAny(x => x.ModList)
|
||||
.Select(modList => !string.IsNullOrEmpty(modList?.Readme)),
|
||||
this.WhenAny(x => x.UIReady),
|
||||
resultSelector: (modListExists, uiReady) => modListExists && uiReady)
|
||||
.ObserveOnGuiThread());
|
||||
this.BeginCommand = ReactiveCommand.Create(
|
||||
execute: this.ExecuteBegin,
|
||||
|
Loading…
Reference in New Issue
Block a user