mirror of
https://github.com/bitwarden/android.git
synced 2024-12-25 02:18:27 +03:00
[SG-831] Pull Down Sync does not retrieve pending AuthRequests (#2196)
* [SG-831] Pull to refresh forces refresh. * [SG-831] Expose sync login request method to be used independently * [SG-831] Change sync order
This commit is contained in:
parent
8e09f0cc15
commit
34fd30e157
4 changed files with 6 additions and 2 deletions
|
@ -90,6 +90,7 @@ namespace Bit.App.Pages
|
|||
try
|
||||
{
|
||||
await _deviceActionService.ShowLoadingAsync(AppResources.Syncing);
|
||||
await _syncService.SyncPasswordlessLoginRequestsAsync();
|
||||
var success = await _syncService.FullSyncAsync(true);
|
||||
await _deviceActionService.HideLoadingAsync();
|
||||
if (success)
|
||||
|
|
|
@ -189,6 +189,7 @@ namespace Bit.App.Pages
|
|||
if (await _stateService.GetSyncOnRefreshAsync() && Refreshing && !SyncRefreshing)
|
||||
{
|
||||
SyncRefreshing = true;
|
||||
await _syncService.SyncPasswordlessLoginRequestsAsync();
|
||||
await _syncService.FullSyncAsync(false);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -14,5 +14,7 @@ namespace Bit.Core.Abstractions
|
|||
Task<bool> SyncDeleteFolderAsync(SyncFolderNotification notification);
|
||||
Task<bool> SyncUpsertCipherAsync(SyncCipherNotification notification, bool isEdit);
|
||||
Task<bool> SyncUpsertFolderAsync(SyncFolderNotification notification, bool isEdit);
|
||||
// Passwordless code will be moved to an independent service in future techdept
|
||||
Task SyncPasswordlessLoginRequestsAsync();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -111,7 +111,6 @@ namespace Bit.Core.Services
|
|||
await SyncSettingsAsync(userId, response.Domains);
|
||||
await SyncPoliciesAsync(response.Policies);
|
||||
await SyncSendsAsync(userId, response.Sends);
|
||||
await SyncPasswordlessLoginRequestsAsync(userId);
|
||||
await SetLastSyncAsync(now);
|
||||
return SyncCompleted(true);
|
||||
}
|
||||
|
@ -387,10 +386,11 @@ namespace Bit.Core.Services
|
|||
await _sendService.ReplaceAsync(sends);
|
||||
}
|
||||
|
||||
private async Task SyncPasswordlessLoginRequestsAsync(string userId)
|
||||
public async Task SyncPasswordlessLoginRequestsAsync()
|
||||
{
|
||||
try
|
||||
{
|
||||
var userId = await _stateService.GetActiveUserIdAsync();
|
||||
// if the user has not enabled passwordless logins ignore requests
|
||||
if (!await _stateService.GetApprovePasswordlessLoginsAsync(userId))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue