ICommand ProcessCommand(LocationSyncType syncType) => ReactiveCommand.CreateFromTask(async() => { var result = await this.dialogs.Confirm("Run the sync?"); if (!result) { return; } await this.dialogs.LoadingTask(() => this.syncManager.ForceRun(syncType), "Running Sync Processes"); await this.dialogs.Snackbar("Sync Process Complete"); });
ICommand ClearCommand(LocationSyncType syncType) => ReactiveCommand.CreateFromTask(async() => { var result = await this.dialogs.Confirm("Are you sure you want to delete these events?"); if (!result) { return; } await conn.DeleteAllAsync <LocationSyncEvent>(); await syncManager.ClearEvents(syncType); await this.dialogs.Snackbar("Events Cleared"); });