Skip to content

Commit

Permalink
implemented new CanShowDialog method
Browse files Browse the repository at this point in the history
  • Loading branch information
brianlagunas committed Oct 15, 2021
1 parent 866bbc1 commit cdba4de
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,5 +185,14 @@ public virtual Task<string> DisplayPromptAsync(string title, string message, str
var keyboard = _keyboardMapper.Map(keyboardType);
return _applicationProvider.MainPage.DisplayPromptAsync(title, message, accept, cancel, placeholder, maxLength, keyboard, initialValue);
}

/// <summary>
/// Determines if the dialog can be shown.
/// </summary>
/// <returns>True is you can show the dialog; False if the dialog cannot be shown</returns>
public bool CanShowDialog()
{
return _applicationProvider.MainPage != null;
}
}
}

0 comments on commit cdba4de

Please sign in to comment.