1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-15 15:53:44 +00:00

clear clipboard alarm

This commit is contained in:
Kyle Spearrin
2019-05-30 11:22:35 -04:00
parent 49705b1074
commit 70fa41ca3e
6 changed files with 68 additions and 2 deletions

View File

@@ -179,8 +179,12 @@ namespace Bit.App.Services
public async Task CopyToClipboardAsync(string text, Dictionary<string, object> options = null)
{
var clearMs = options != null && options.ContainsKey("clearMs") ? (int?)options["clearMs"] : null;
var clearing = options != null && options.ContainsKey("clearing") ? (bool)options["clearing"] : false;
await Clipboard.SetTextAsync(text);
_messagingService.Send("copiedToClipboard", new Tuple<string, int?>(text, clearMs));
if(!clearing)
{
_messagingService.Send("copiedToClipboard", new Tuple<string, int?, bool>(text, clearMs, clearing));
}
}
public async Task<string> ReadFromClipboardAsync(Dictionary<string, object> options = null)