Skip to content

Commit

Permalink
Merge pull request #442 from ramonB1996/bugfix-materialmenudialog-set…
Browse files Browse the repository at this point in the history
…result

Fixed a bug with setresult causing exception, when action was trigger…
  • Loading branch information
martijn00 authored Jan 6, 2022
2 parents 6f387a5 + 66d8c0d commit 00da17c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions XF.Material/UI/Dialogs/MaterialMenuDialog.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,12 @@ protected override void OnAppearingAnimationBegin()

protected override void OnBackButtonDismissed()
{
InputTaskCompletionSource.SetResult(-1);
InputTaskCompletionSource.TrySetResult(-1);
}

protected override bool OnBackgroundClicked()
{
InputTaskCompletionSource.SetResult(-1);
InputTaskCompletionSource.TrySetResult(-1);

return base.OnBackgroundClicked();
}
Expand Down Expand Up @@ -160,7 +160,7 @@ private void CreateActions(MaterialMenuConfiguration configuration)

actionModel.IsSelected = true;
await DismissAsync();
InputTaskCompletionSource?.SetResult(position);
InputTaskCompletionSource?.TrySetResult(position);
});
actionModel.SizeChangeCommand = new Command<Dictionary<string, object>>(LabelSizeChanged);

Expand Down

0 comments on commit 00da17c

Please sign in to comment.