public void Start(ISyncManager syncManager) { Stop(); backgroundService.AppResumedFromBackground .Where(timeInBackground => timeInBackground >= MinimumTimeInBackgroundForFullSync) .SelectMany(_ => syncManager.ForceFullSync()) .Subscribe() .DisposedBy(syncingDisposeBag); timeService.MidnightObservable .Subscribe(_ => syncManager.CleanUp()) .DisposedBy(syncingDisposeBag); }
protected override async Task Act(ISyncManager syncManager) { await syncManager.CleanUp(); }
protected override async Task Act(ISyncManager syncManager, AppServices appServices) { await syncManager.CleanUp(); }