1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-18 09:13:15 +00:00

needs migration flag

This commit is contained in:
Kyle Spearrin
2019-05-30 15:11:22 -04:00
parent c7b62c8551
commit 419cfceef1
4 changed files with 20 additions and 9 deletions

View File

@@ -13,6 +13,8 @@ namespace Bit.App.Utilities
{
public static class AppHelpers
{
public static bool NeedsMigration = false;
public static async Task<string> CipherListOptions(ContentPage page, CipherView cipher)
{
var platformUtilsService = ServiceContainer.Resolve<IPlatformUtilsService>("platformUtilsService");
@@ -114,17 +116,19 @@ namespace Bit.App.Utilities
public static async Task<bool> PerformUpdateTasksAsync(ISyncService syncService,
IDeviceActionService deviceActionService, IStorageService storageService)
{
var lastSync = await syncService.GetLastSyncAsync();
var currentBuild = deviceActionService.GetBuildNumber();
var lastBuild = await storageService.GetAsync<string>(Constants.LastBuildKey);
if(lastBuild == null)
if(!NeedsMigration)
{
// Installed
}
else if(lastBuild != currentBuild)
{
// Updated
var tasks = Task.Run(() => syncService.FullSyncAsync(true));
if(lastBuild == null)
{
// Installed
}
else if(lastBuild != currentBuild)
{
// Updated
var tasks = Task.Run(() => syncService.FullSyncAsync(true));
}
}
if(lastBuild != currentBuild)
{