1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-16 00:03:22 +00:00

More sync operations with broadcast refreshes of listing pages

This commit is contained in:
Kyle Spearrin
2016-06-30 20:08:34 -04:00
parent acfe0032ef
commit 8fd4e09b78
9 changed files with 117 additions and 6120 deletions

View File

@@ -6,6 +6,7 @@ using Bit.App.Models.Data;
using Plugin.Settings.Abstractions;
using Bit.App.Models.Api;
using System.Collections.Generic;
using Xamarin.Forms;
namespace Bit.App.Services
{
@@ -82,6 +83,7 @@ namespace Bit.App.Services
return false;
}
BroadcastSyncCompleted();
return true;
}
@@ -93,6 +95,7 @@ namespace Bit.App.Services
}
await _folderRepository.DeleteAsync(id);
BroadcastSyncCompleted();
return true;
}
@@ -104,6 +107,7 @@ namespace Bit.App.Services
}
await _siteRepository.DeleteAsync(id);
BroadcastSyncCompleted();
return true;
}
@@ -131,6 +135,7 @@ namespace Bit.App.Services
}
_settings.AddOrUpdateValue(LastSyncKey, now);
BroadcastSyncCompleted();
return true;
}
@@ -165,6 +170,7 @@ namespace Bit.App.Services
}
_settings.AddOrUpdateValue(LastSyncKey, now);
BroadcastSyncCompleted();
return true;
}
@@ -238,5 +244,10 @@ namespace Bit.App.Services
}
await Task.WhenAll(tasks);
}
private void BroadcastSyncCompleted()
{
MessagingCenter.Send(Application.Current, "SyncCompleted");
}
}
}