private void DeleteGroup(GroupCellModel model) { _previousIndex = Groups.IndexOf(model); Device.BeginInvokeOnMainThread(() => { IsProcessing = true; Groups.Remove(model); PushRevertNotification(RevertCommand, model); //var taskScheduler = TaskScheduler.Current; //System.Threading.Tasks.Task.Run(() => { }).ContinueWith(task => { }); System.Threading.Tasks.Task.Delay(5000).ConfigureAwait(true); if (model.ActionCanceled) { return; } //TODO: implement persistence logic PushNotification(Messages.NotificationMessageSaveChanges, NotificationType.Info, 3000); IsProcessing = false; }); }
private void RevertDeletedGroup(GroupCellModel model) { Device.BeginInvokeOnMainThread(async() => { model.ActionCanceled = true; Groups.Insert(_previousIndex, model); }); }
private void EditGroup(GroupCellModel model) { Device.BeginInvokeOnMainThread(() => { IsProcessing = true; //TODO: implement persistence logic PushNotification(Messages.NotificationMessageSaveChanges, NotificationType.Info, 3000); IsProcessing = false; }); }