mirror of
https://github.com/bitwarden/android.git
synced 2024-12-24 18:08:26 +03:00
lock page fixes
This commit is contained in:
parent
27b6631cc1
commit
5f6a3f4cb5
5 changed files with 26 additions and 5 deletions
|
@ -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();
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -169,6 +169,7 @@ namespace Bit.App.Pages
|
|||
private async Task SetKeyAndContinueAsync(SymmetricCryptoKey key)
|
||||
{
|
||||
await _cryptoService.SetKeyAsync(key);
|
||||
DoContinue();
|
||||
}
|
||||
|
||||
private void DoContinue()
|
||||
|
|
9
src/App/Resources/AppResources.Designer.cs
generated
9
src/App/Resources/AppResources.Designer.cs
generated
|
@ -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>
|
||||
|
|
|
@ -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>
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue