public void AddVideoItem(VideoItem videoItem) { VideoItemViewModels.Add(new VideoItemViewModel(videoItem, removeFromVideos: async vm => { await RemoveVideoItemViewModel(vm); })); }
public async Task RemoveVideoItemViewModel(VideoItemViewModel videoItemViewModel) { var videoItem = videoItemViewModel.VideoItem; var videoFile = _camera.OpenVideoFile(videoItem.Path); await PerformVideoUpload(videoFile); _camera.DeleteVideoFile(videoFile); await _store.DeleteAsync(videoItem); VideoItemViewModels.Remove(videoItemViewModel); }