1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-11 05:43:30 +00:00

pop pages if cipher doesnt exist

This commit is contained in:
Kyle Spearrin
2019-05-30 08:40:10 -04:00
parent 46a8ffa5ae
commit e34ca49b9b
4 changed files with 28 additions and 4 deletions

View File

@@ -206,10 +206,14 @@ namespace Bit.App.Pages
}
}
public async Task LoadAsync()
public async Task<bool> LoadAsync()
{
CleanUp();
var cipher = await _cipherService.GetAsync(CipherId);
if(cipher == null)
{
return false;
}
Cipher = await cipher.DecryptAsync();
CanAccessPremium = await _userService.CanAccessPremiumAsync();
Fields = Cipher.Fields?.Select(f => new ViewPageFieldViewModel(f)).ToList();
@@ -231,6 +235,7 @@ namespace Bit.App.Pages
return true;
});
}
return true;
}
public void CleanUp()