don't migrate push:lastRegistrationDate

This commit is contained in:
Kyle Spearrin 2019-06-03 15:15:00 -04:00
parent f8969675e7
commit c9faa40475

View file

@ -98,11 +98,10 @@ namespace Bit.App.Migration
settingsShim.GetValueOrDefault("push:currentToken", null)); settingsShim.GetValueOrDefault("push:currentToken", null));
await storageService.SaveAsync(Constants.PushRegisteredTokenKey, await storageService.SaveAsync(Constants.PushRegisteredTokenKey,
settingsShim.GetValueOrDefault("push:registeredToken", null)); settingsShim.GetValueOrDefault("push:registeredToken", null));
Log("Migrating 6.9"); // For some reason "push:lastRegistrationDate" isn't getting pulled from settingsShim correctly.
var lastReg = settingsShim.GetValueOrDefault("push:lastRegistrationDate", DateTime.MinValue); // We don't really need it anyways.
Log("Migrating 6.9.1 = " + lastReg); // var lastReg = settingsShim.GetValueOrDefault("push:lastRegistrationDate", DateTime.MinValue);
await storageService.SaveAsync(Constants.PushLastRegistrationDateKey, lastReg); // await storageService.SaveAsync(Constants.PushLastRegistrationDateKey, lastReg);
Log("Migrating 6.10");
await storageService.SaveAsync("rememberedEmail", await storageService.SaveAsync("rememberedEmail",
settingsShim.GetValueOrDefault("other:lastLoginEmail", null)); settingsShim.GetValueOrDefault("other:lastLoginEmail", null));
@ -183,11 +182,5 @@ namespace Bit.App.Migration
var task = Task.Run(() => syncService.FullSyncAsync(true)); var task = Task.Run(() => syncService.FullSyncAsync(true));
return true; return true;
} }
private static void Log(string message)
{
ServiceContainer.Resolve<ILogService>("logService").Info(message);
System.Diagnostics.Debug.WriteLine(message);
}
} }
} }