mirror of
https://github.com/bitwarden/mobile
synced 2025-12-05 23:53:33 +00:00
null checks on dialogs
This commit is contained in:
@@ -474,6 +474,11 @@ namespace Bit.Android.Services
|
||||
public Task<string> DisplayPromptAync(string title = null, string description = null, string text = null)
|
||||
{
|
||||
var activity = (MainActivity)CurrentContext;
|
||||
if(activity == null)
|
||||
{
|
||||
return Task.FromResult<string>(null);
|
||||
}
|
||||
|
||||
var alertBuilder = new AlertDialog.Builder(activity);
|
||||
alertBuilder.SetTitle(title);
|
||||
alertBuilder.SetMessage(description);
|
||||
|
||||
Reference in New Issue
Block a user