mirror of
https://github.com/bitwarden/android.git
synced 2024-12-24 18:08:26 +03:00
check authed and unlocked before trying to load
This commit is contained in:
parent
b354986199
commit
aed3ec5474
1 changed files with 13 additions and 0 deletions
|
@ -37,6 +37,8 @@ namespace Bit.App.Pages
|
|||
private readonly IFolderService _folderService;
|
||||
private readonly ICollectionService _collectionService;
|
||||
private readonly ISyncService _syncService;
|
||||
private readonly IUserService _userService;
|
||||
private readonly ILockService _lockService;
|
||||
private readonly IDeviceActionService _deviceActionService;
|
||||
private readonly IPlatformUtilsService _platformUtilsService;
|
||||
private readonly IMessagingService _messagingService;
|
||||
|
@ -48,6 +50,8 @@ namespace Bit.App.Pages
|
|||
_folderService = ServiceContainer.Resolve<IFolderService>("folderService");
|
||||
_collectionService = ServiceContainer.Resolve<ICollectionService>("collectionService");
|
||||
_syncService = ServiceContainer.Resolve<ISyncService>("syncService");
|
||||
_userService = ServiceContainer.Resolve<IUserService>("userService");
|
||||
_lockService = ServiceContainer.Resolve<ILockService>("lockService");
|
||||
_deviceActionService = ServiceContainer.Resolve<IDeviceActionService>("deviceActionService");
|
||||
_platformUtilsService = ServiceContainer.Resolve<IPlatformUtilsService>("platformUtilsService");
|
||||
_messagingService = ServiceContainer.Resolve<IMessagingService>("messagingService");
|
||||
|
@ -134,6 +138,15 @@ namespace Bit.App.Pages
|
|||
{
|
||||
return;
|
||||
}
|
||||
var authed = await _userService.IsAuthenticatedAsync();
|
||||
if(!authed)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if(await _lockService.IsLockedAsync())
|
||||
{
|
||||
return;
|
||||
}
|
||||
_doingLoad = true;
|
||||
LoadedOnce = true;
|
||||
ShowNoData = false;
|
||||
|
|
Loading…
Reference in a new issue