Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion PickaView/Views/Like/LikeViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,8 @@ extension LikeViewController: UICollectionViewDataSource, UICollectionViewDelega
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
guard let selectedVideo = viewModel.video(at: indexPath.item) else { return }

let playerVC = PlayerViewController()
let playerStoryboard = UIStoryboard(name: "Player", bundle: nil)
let playerVC = playerStoryboard.instantiateViewController(withIdentifier: String(describing: PlayerViewController.self)) as! PlayerViewController
playerVC.viewModel = PlayerViewModel(video: selectedVideo, coreDataManager: viewModel.getCoreDataManager())
playerVC.modalPresentationStyle = .fullScreen
present(playerVC, animated: true, completion: nil)
Expand Down
2 changes: 1 addition & 1 deletion PickaView/Views/Player/PlayerViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ final class PlayerViewModel {
private let coreDataManager: CoreDataManager

init(video: Video, coreDataManager: CoreDataManager) {
self.coreDataManager = coreDataManager
self.video = video
self.coreDataManager = coreDataManager
}

var videoURL: URL? {
Expand Down