Example #1
0
        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;
            });
        }
Example #2
0
 private void RevertDeletedGroup(GroupCellModel model)
 {
     Device.BeginInvokeOnMainThread(async() =>
     {
         model.ActionCanceled = true;
         Groups.Insert(_previousIndex, model);
     });
 }
Example #3
0
        private void EditGroup(GroupCellModel model)
        {
            Device.BeginInvokeOnMainThread(() =>
            {
                IsProcessing = true;

                //TODO: implement persistence logic

                PushNotification(Messages.NotificationMessageSaveChanges, NotificationType.Info, 3000);
                IsProcessing = false;
            });
        }