1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-17 16:53:26 +00:00

show loading indicator if syncing an no items

This commit is contained in:
Kyle Spearrin
2017-11-27 15:42:36 -05:00
parent e753acbc3f
commit 9bbddd6aeb
4 changed files with 22 additions and 11 deletions

View File

@@ -29,9 +29,9 @@ namespace Bit.App.Controls
{
if(_syncIndicator)
{
MessagingCenter.Subscribe<ISyncService, bool>(_syncService, "SyncCompleted",
MessagingCenter.Subscribe<Application, bool>(Application.Current, "SyncCompleted",
(sender, success) => Device.BeginInvokeOnMainThread(() => IsBusy = _syncService.SyncInProgress));
MessagingCenter.Subscribe<ISyncService>(_syncService, "SyncStarted",
MessagingCenter.Subscribe<ISyncService>(Application.Current, "SyncStarted",
(sender) => Device.BeginInvokeOnMainThread(() => IsBusy = _syncService.SyncInProgress));
}
@@ -48,8 +48,8 @@ namespace Bit.App.Controls
{
if(_syncIndicator)
{
MessagingCenter.Unsubscribe<ISyncService, bool>(_syncService, "SyncCompleted");
MessagingCenter.Unsubscribe<ISyncService>(_syncService, "SyncStarted");
MessagingCenter.Unsubscribe<Application, bool>(Application.Current, "SyncCompleted");
MessagingCenter.Unsubscribe<Application>(Application.Current, "SyncStarted");
}
if(_syncIndicator)