sync when finished migrating

This commit is contained in:
Kyle Spearrin 2019-06-03 14:32:43 -04:00
parent 17b90c744c
commit 5eee358059
3 changed files with 6 additions and 1 deletions

View file

@ -124,7 +124,6 @@ namespace Bit.App
else if(message.Command == "migrated") else if(message.Command == "migrated")
{ {
await Task.Delay(1000); await Task.Delay(1000);
SyncIfNeeded();
await SetMainPageAsync(); await SetMainPageAsync();
} }
}); });

View file

@ -40,6 +40,7 @@ namespace Bit.App.Migration
var environmentService = ServiceContainer.Resolve<IEnvironmentService>("environmentService"); var environmentService = ServiceContainer.Resolve<IEnvironmentService>("environmentService");
var passwordGenerationService = ServiceContainer.Resolve<IPasswordGenerationService>( var passwordGenerationService = ServiceContainer.Resolve<IPasswordGenerationService>(
"passwordGenerationService"); "passwordGenerationService");
var syncService = ServiceContainer.Resolve<ISyncService>("syncService");
Log("Migrating 2"); Log("Migrating 2");
// Get old data // Get old data
@ -189,6 +190,7 @@ namespace Bit.App.Migration
settingsShim.Remove(Constants.OldUserIdKey); settingsShim.Remove(Constants.OldUserIdKey);
Migrating = false; Migrating = false;
messagingService.Send("migrated"); messagingService.Send("migrated");
var task = Task.Run(() => syncService.FullSyncAsync(true));
Log("Migrating 11"); Log("Migrating 11");
return true; return true;
} }

View file

@ -183,6 +183,10 @@ namespace Bit.App.Pages
get => _wordSeparator; get => _wordSeparator;
set set
{ {
if(value == null)
{
return;
}
var val = value.Trim(); var val = value.Trim();
if(SetProperty(ref _wordSeparator, val)) if(SetProperty(ref _wordSeparator, val))
{ {