public async Task HandleDeleteDataAction(DeleteDataAction action, IDispatcher dispatcher) { try { await _dataService.DeleteThootleAsync(action.Id); dispatcher.Dispatch(new FetchDataAction()); } catch (Exception e) { dispatcher.Dispatch(new ErrorAction(e.Message)); } }
public static DataState ReduceDeleteDataAction(DataState state, DeleteDataAction action) { return(new DataState(state.Thootles, true)); }