1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-18 01:03:24 +00:00

Added "first load" check on site list to wait for sync to complete if key changed. Renamed "other" constants.

This commit is contained in:
Kyle Spearrin
2016-08-05 23:58:31 -04:00
parent d96a94b478
commit 38184e4893
18 changed files with 54 additions and 26 deletions

View File

@@ -88,7 +88,23 @@ namespace Bit.App.Services
}
}
public bool KeyChanged => !PreviousKey?.SequenceEqual(Key) ?? Key == null ? false : true;
public bool KeyChanged
{
get
{
if(Key == null)
{
throw new InvalidOperationException("Key must be set before asking if it has changed.");
}
if(PreviousKey == null)
{
return Key != null;
}
return !PreviousKey.SequenceEqual(Key);
}
}
public CipherString Encrypt(string plaintextValue)
{