1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-18 09:13:15 +00:00

log some events

This commit is contained in:
Kyle Spearrin
2019-07-12 17:29:40 -04:00
parent df2af5459e
commit 38d702b6fe
8 changed files with 121 additions and 8 deletions

View File

@@ -16,6 +16,7 @@ namespace Bit.App.Utilities
public static async Task<string> CipherListOptions(ContentPage page, CipherView cipher)
{
var platformUtilsService = ServiceContainer.Resolve<IPlatformUtilsService>("platformUtilsService");
var eventService = ServiceContainer.Resolve<IEventService>("eventService");
var options = new List<string> { AppResources.View, AppResources.Edit };
if(cipher.Type == Core.Enums.CipherType.Login)
{
@@ -79,6 +80,7 @@ namespace Bit.App.Utilities
await platformUtilsService.CopyToClipboardAsync(cipher.Login.Password);
platformUtilsService.ShowToast("info", null,
string.Format(AppResources.ValueHasBeenCopied, AppResources.Password));
var task = eventService.CollectAsync(Core.Enums.EventType.Cipher_ClientCopiedPassword, cipher.Id);
}
else if(selection == AppResources.CopyTotp)
{
@@ -106,6 +108,7 @@ namespace Bit.App.Utilities
await platformUtilsService.CopyToClipboardAsync(cipher.Card.Code);
platformUtilsService.ShowToast("info", null,
string.Format(AppResources.ValueHasBeenCopied, AppResources.SecurityCode));
var task = eventService.CollectAsync(Core.Enums.EventType.Cipher_ClientCopiedCardCode, cipher.Id);
}
else if(selection == AppResources.CopyNotes)
{