1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-12-17 15:27:43 +01:00

lock page fixes

This commit is contained in:
Kyle Spearrin 2019-05-16 08:41:57 -04:00
parent 27b6631cc1
commit 5f6a3f4cb5
5 changed files with 26 additions and 5 deletions

View File

@ -1,4 +1,5 @@
using System;
using System.Threading.Tasks;
using Xamarin.Forms;
namespace Bit.App.Pages
@ -33,11 +34,18 @@ namespace Bit.App.Pages
}
}
private async void Unlock_Clicked(object sender, EventArgs e)
private void Unlock_Clicked(object sender, EventArgs e)
{
if(DoOnce())
{
await _vm.SubmitAsync();
var tasks = Task.Run(async () =>
{
await Task.Delay(50);
Device.BeginInvokeOnMainThread(async () =>
{
await _vm.SubmitAsync();
});
});
}
}

View File

@ -169,6 +169,7 @@ namespace Bit.App.Pages
private async Task SetKeyAndContinueAsync(SymmetricCryptoKey key)
{
await _cryptoService.SetKeyAsync(key);
DoContinue();
}
private void DoContinue()

View File

@ -3498,6 +3498,15 @@ namespace Bit.App.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Unlock.
/// </summary>
public static string Unlock {
get {
return ResourceManager.GetString("Unlock", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Unlock with {0}.
/// </summary>

View File

@ -1487,4 +1487,7 @@
<data name="PIN" xml:space="preserve">
<value>PIN</value>
</data>
<data name="Unlock" xml:space="preserve">
<value>Unlock</value>
</data>
</root>

View File

@ -99,7 +99,7 @@ namespace Bit.Core.Services
{
_key = new SymmetricCryptoKey(Convert.FromBase64String(key));
}
return key == null ? null : _key;
return _key;
}
public async Task<string> GetKeyHashAsync()
@ -108,12 +108,12 @@ namespace Bit.Core.Services
{
return _keyHash;
}
var keyHash = await _secureStorageService.GetAsync<string>(Keys_KeyHash);
var keyHash = await _storageService.GetAsync<string>(Keys_KeyHash);
if(keyHash != null)
{
_keyHash = keyHash;
}
return keyHash == null ? null : _keyHash;
return _keyHash;
}
public Task<SymmetricCryptoKey> GetEncKeyAsync()