1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-11-23 11:45:38 +01:00

fixes for extension add login

This commit is contained in:
Kyle Spearrin 2017-11-03 16:58:04 -04:00
parent 3dc705a7a9
commit 73b310d59e

View File

@ -157,6 +157,7 @@ namespace Bit.iOS.Extension
Notes = string.IsNullOrWhiteSpace(NotesCell.TextView.Text) ? null : NotesCell.TextView.Text.Encrypt(), Notes = string.IsNullOrWhiteSpace(NotesCell.TextView.Text) ? null : NotesCell.TextView.Text.Encrypt(),
Favorite = FavoriteCell.Switch.On, Favorite = FavoriteCell.Switch.On,
FolderId = FolderCell.SelectedIndex == 0 ? null : _folders.ElementAtOrDefault(FolderCell.SelectedIndex - 1)?.Id, FolderId = FolderCell.SelectedIndex == 0 ? null : _folders.ElementAtOrDefault(FolderCell.SelectedIndex - 1)?.Id,
Type = App.Enums.CipherType.Login,
Login = new Login Login = new Login
{ {
Uri = string.IsNullOrWhiteSpace(UriCell.TextField.Text) ? null : UriCell.TextField.Text.Encrypt(), Uri = string.IsNullOrWhiteSpace(UriCell.TextField.Text) ? null : UriCell.TextField.Text.Encrypt(),
@ -170,6 +171,7 @@ namespace Bit.iOS.Extension
PresentViewController(loadingAlert, true, null); PresentViewController(loadingAlert, true, null);
await saveTask; await saveTask;
await loadingAlert.DismissViewControllerAsync(true);
if(saveTask.Result.Succeeded) if(saveTask.Result.Succeeded)
{ {
_googleAnalyticsService.TrackExtensionEvent("CreatedLogin"); _googleAnalyticsService.TrackExtensionEvent("CreatedLogin");