Skip to content

Commit

Permalink
Avalonia folder pickers use "" for cancel, rather than .NETFX's null.
Browse files Browse the repository at this point in the history
  • Loading branch information
TwelveBaud committed Sep 21, 2021
1 parent 67318d5 commit 51ed312
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Client/ViewModels/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ private async Task<WorkbookModel> NewWorkbookAsync(
{
var path = await this.NewWorkbookSpecifyPathInteraction.Handle(Unit.Default);

if (path == null)
if (string.IsNullOrEmpty(path))
{
// We don't have access to the observable subscription or CTS here since it's eaten by Avalonia.
throw new TaskCanceledException();
Expand All @@ -78,7 +78,7 @@ private async Task<WorkbookModel> LoadWorkbookAsync(
{
var path = await this.LoadWorkbookSpecifyPathInteraction.Handle(Unit.Default);

if (path == null)
if (string.IsNullOrEmpty(path))
{
// We don't have access to the observable subscription or CTS here since it's eaten by Avalonia.
throw new TaskCanceledException();
Expand Down
2 changes: 1 addition & 1 deletion src/Client/Workbooks/Views/RequestWorkbookItem.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public RequestWorkbookItem()
.PointerReleased
.Select(_ => this.ViewModel?.RequestModel)
.Where(requestModel => requestModel != null)
.InvokeCommand(this, view => view.ViewModel!.OpenRequestCommand)
.InvokeCommand(this, view => view.ViewModel!.OpenRequestCommand!)
.DisposeWith(disposables);
});
}
Expand Down

0 comments on commit 51ed312

Please sign in to comment.