mirror of
https://github.com/bitwarden/android.git
synced 2024-12-24 01:48:25 +03:00
do full sync if no data is present
This commit is contained in:
parent
dbc750b44e
commit
279b53704b
1 changed files with 11 additions and 1 deletions
|
@ -72,6 +72,7 @@ namespace Bit.App.Pages
|
|||
}
|
||||
});
|
||||
|
||||
var migratedFromV1 = await _storageService.GetAsync<bool?>(Constants.MigratedFromV1);
|
||||
await LoadOnAppearedAsync(_mainLayout, false, async () =>
|
||||
{
|
||||
if(!_syncService.SyncInProgress)
|
||||
|
@ -86,8 +87,18 @@ namespace Bit.App.Pages
|
|||
await _vm.LoadAsync();
|
||||
}
|
||||
}
|
||||
if(_vm.MainPage && !_syncService.SyncInProgress && migratedFromV1.GetValueOrDefault() &&
|
||||
_vm.Ciphers.Count == 0 && _vm.Folders.Count == 0)
|
||||
{
|
||||
await _syncService.FullSyncAsync(true);
|
||||
}
|
||||
}, _mainContent);
|
||||
|
||||
if(!_vm.MainPage)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Push registration
|
||||
var lastPushRegistration = await _storageService.GetAsync<DateTime?>(Constants.PushLastRegistrationDateKey);
|
||||
lastPushRegistration = lastPushRegistration.GetValueOrDefault(DateTime.MinValue);
|
||||
|
@ -115,7 +126,6 @@ namespace Bit.App.Pages
|
|||
if(!_deviceActionService.AutofillAccessibilityServiceRunning()
|
||||
&& !_deviceActionService.AutofillServiceEnabled())
|
||||
{
|
||||
var migratedFromV1 = await _storageService.GetAsync<bool?>(Constants.MigratedFromV1);
|
||||
if(migratedFromV1.GetValueOrDefault())
|
||||
{
|
||||
var migratedFromV1AutofillPromptShown = await _storageService.GetAsync<bool?>(
|
||||
|
|
Loading…
Reference in a new issue