Skip to content

Commit

Permalink
#90 #142 #156 feat: 레이어에 연결한 뮤직세션을 통해 음악 재생 테스트
Browse files Browse the repository at this point in the history
테스트를 위해 일기 상세 뷰 모델에는 더미 데이터 삽입
  • Loading branch information
radiantchoi committed Dec 7, 2022
1 parent aff47a6 commit a70b0df
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ final class DiaryDetailViewController: UIViewController {
}

private let disposeBag = DisposeBag()
private let musicSession = MusicSession() // 임시로 여기에 놓습니다
private let viewModel: DiaryDetailViewModel
weak var delegate: DiaryDetailViewDelegate?

Expand Down Expand Up @@ -118,10 +117,12 @@ final class DiaryDetailViewController: UIViewController {
setupLayout()
bindDiaryItem()
getDiary()

viewModel.testDataInsert() // 임시 투입 메서드입니다.
}

override func viewWillDisappear(_ animated: Bool) {
musicSession.stopMusic()
viewModel.stopMusic()
}

override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
Expand Down Expand Up @@ -239,8 +240,7 @@ final class DiaryDetailViewController: UIViewController {

extension DiaryDetailViewController: MusicContentViewDelegate {
func playButtonTapped() {
musicSession.togglePlayer()
// viewModel.toggleMusicPlayer()
viewModel.toggleMusicPlayer()
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ final class DiaryDetailViewModel {
self.playMusicUseCase = playMusicUseCase

setupMusicPlayer()
testDataInsert()
}

func testDataInsert() {
Expand Down

0 comments on commit a70b0df

Please sign in to comment.