Пример #1
0
        private async Task delete(TimeEntryViewModel timeEntryViewModel)
        {
            await interactorFactory.DeleteTimeEntry(timeEntryViewModel.Id).Execute();

            analyticsService.DeleteTimeEntry.Track();
            dataSource.SyncManager.PushSync();
        }
Пример #2
0
 private IObservable <Unit> deleteTimeEntry(TimeEntryViewModel timeEntry)
 {
     return(interactorFactory
            .DeleteTimeEntry(timeEntry.Id)
            .Execute()
            .Do(_ => {
         analyticsService.DeleteTimeEntry.Track();
         dataSource.SyncManager.PushSync();
     }));
 }
Пример #3
0
        private async Task delete()
        {
            var actionType = IsEditingGroup
                ? ActionType.DeleteMultipleExistingTimeEntries
                : ActionType.DeleteExistingTimeEntry;

            var interactor = IsEditingGroup
                ? interactorFactory.DeleteMultipleTimeEntries(TimeEntryIds)
                : interactorFactory.DeleteTimeEntry(TimeEntryId);

            var isDeletionConfirmed = await delete(actionType, TimeEntryIds.Length, interactor);

            if (isDeletionConfirmed)
            {
                close(EditViewCloseReason.Delete);
            }
        }