From c3d7cf125fcfe23bd69824a280a3c4a62c5d0650 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Thu, 4 Aug 2016 23:56:44 -0400 Subject: [PATCH] sync check on disappear --- src/App/Controls/ExtendedContentPage.cs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/App/Controls/ExtendedContentPage.cs b/src/App/Controls/ExtendedContentPage.cs index f261b7561..7537635db 100644 --- a/src/App/Controls/ExtendedContentPage.cs +++ b/src/App/Controls/ExtendedContentPage.cs @@ -7,14 +7,16 @@ namespace Bit.App.Controls public class ExtendedContentPage : ContentPage { private ISyncService _syncService; + private bool _syncIndicator; public ExtendedContentPage(bool syncIndicator = true) { + _syncIndicator = syncIndicator; _syncService = Resolver.Resolve(); BackgroundColor = Color.FromHex("efeff4"); - if(syncIndicator) + if(_syncIndicator) { IsBusy = _syncService.SyncInProgress; @@ -32,6 +34,11 @@ namespace Bit.App.Controls protected override void OnAppearing() { + if(_syncIndicator) + { + IsBusy = _syncService.SyncInProgress; + } + var googleAnalyticsService = Resolver.Resolve(); googleAnalyticsService.TrackPage(GetType().Name); base.OnAppearing(); @@ -39,7 +46,11 @@ namespace Bit.App.Controls protected override void OnDisappearing() { - IsBusy = false; + if(_syncIndicator) + { + IsBusy = _syncService.SyncInProgress; + } + base.OnDisappearing(); } }