Esempio n. 1
0
        protected override Task OnSuspendingApplicationAsync()
        {
            var task = base.OnSuspendingApplicationAsync();
            // Stop Background Sync Tasks
            List <FolderSyncInfo> activeSyncs = SyncDbUtils.GetActiveSyncInfos();

            foreach (var fsi in activeSyncs)
            {
                ToastNotificationService.ShowSyncSuspendedNotification(fsi);
                SyncDbUtils.UnlockFolderSyncInfo(fsi);
            }
            return(task);
        }
Esempio n. 2
0
        protected override Task OnSuspendingApplicationAsync()
        {
            var task = base.OnSuspendingApplicationAsync();
            // Stop Background Sync Tasks
            var activeSyncs = SyncDbUtils.GetActiveSyncInfos();

            if (SettingsLocal.PauseSyncInBackground)
            {
                foreach (var fsi in activeSyncs)
                {
                    ToastNotificationService.ShowSyncSuspendedNotification(fsi);
                    SyncDbUtils.UnlockFolderSyncInfo(fsi);
                }
            }
            else
            {
                foreach (var fsi in activeSyncs)
                {
                    ToastNotificationService.ShowSyncInBackgroundNotification(fsi);
                }
            }

            return(task);
        }