mirror of
https://github.com/bitwarden/mobile
synced 2025-12-18 09:13:15 +00:00
needs migration flag
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user