Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 재생화면 VIP 싸이클 적용 #146

Closed
wants to merge 37 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
8dc9499
:sparkles: Toast class 구현
chopmozzi Nov 28, 2023
30e14f4
:recycle: 필요없는 코드 지우기
chopmozzi Nov 28, 2023
4a83716
:recycle: final 붙이기
chopmozzi Nov 28, 2023
adc5036
:sparkles: Playback Configurator 생성 및 적용
chopmozzi Nov 28, 2023
4a4f19d
:sparkles: VideoDTO 생성
chopmozzi Nov 28, 2023
82c1110
:recycle: video dto 수정
chopmozzi Nov 28, 2023
ac3b778
:sparkles: Playback ViewModel 생성
chopmozzi Nov 28, 2023
c4c49a7
:recycle: 재생화면 VIP Cycle 적용(홈에서)
chopmozzi Nov 28, 2023
057b567
:bug: 설정 탭 푸시 시 투명 배경 현상 수정
loinsir Nov 29, 2023
381fde8
:bug: 네비게이션 컨트롤러 중첩 버그 수정
loinsir Nov 29, 2023
4365dec
:sparkles: 초기 재생화면 재생 설정
chopmozzi Nov 29, 2023
bbe94b0
:sparkles: 재생화면 홈화면 VIP 연결
chopmozzi Nov 29, 2023
f422902
:bug: 실 기기에서 소리가 나지 않던 문제 수정
chopmozzi Nov 29, 2023
4989047
:sparkles: 재생화면 초기화면 세팅(홈에서 연결됐을 때)
chopmozzi Nov 29, 2023
1848ec7
:sparkles: 지도와 재생화면 연결
chopmozzi Nov 29, 2023
e3c2ac3
:sparkles: 무한 스크롤 VIP 연결
chopmozzi Nov 29, 2023
8475dbd
:recycle: 코드 정리
chopmozzi Nov 29, 2023
212f3c6
:sparkles: 다른 뷰로 이동 시 재생 바 사라지게 구현
chopmozzi Nov 29, 2023
3296d74
Merge remote-tracking branch 'refs/remotes/origin/iOS/dev'
chopmozzi Nov 29, 2023
109abbf
:sparkles: TagPlayList Scene UI 구현
loinsir Nov 29, 2023
9dbcdea
:recycle: Toast 수정
chopmozzi Nov 29, 2023
310fff5
:wrench: 테스트 코드 삭제
chopmozzi Nov 29, 2023
ce2a20d
:heavy_plus_sign: 태그 검색 더미 데이터 추가
loinsir Nov 29, 2023
980f5f5
:wrench: mock json 필드 수정
loinsir Nov 29, 2023
8316494
Merge pull request #143 from boostcampwm2023/iOS/bug#142
anyukyung Nov 29, 2023
50d6ce7
:heavy_plus_sign: 게시글 DTO 추가
loinsir Nov 29, 2023
cad4185
:sparkles: 태그 검색 뷰 VIP 사이클 구현
loinsir Nov 29, 2023
4001422
:sparkles: Sequence 비동기 extension 메서드 추가
loinsir Nov 30, 2023
e549eb8
:bug: provider data 리턴 타입 디코드 수정
loinsir Nov 30, 2023
3690025
:bento: 샘플 이미지 애셋 변경
loinsir Nov 30, 2023
ac24604
:recycle: 리뷰사항 반영
chopmozzi Nov 30, 2023
2aee1b7
:wrench: 데이터 전달 설정
loinsir Nov 30, 2023
f270691
Merge pull request #130 from boostcampwm2023/iOS/feat#129
anyukyung Nov 30, 2023
5bc5e8e
:wrench: 리뷰 반영 navigation title 표시 로직 수정
loinsir Nov 30, 2023
8ad694e
Merge pull request #149 from boostcampwm2023/iOS/feat#145
loinsir Nov 30, 2023
4c84266
Merge remote-tracking branch 'refs/remotes/origin/iOS/feat#122'
chopmozzi Nov 30, 2023
2b9ce5d
:wrench: 모델 수정
chopmozzi Nov 30, 2023
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
Prev Previous commit
Next Next commit
✨ 재생화면 초기화면 세팅(홈에서 연결됐을 때)
chopmozzi committed Nov 29, 2023
commit 498904761e882923f240e1759806f918f366a288
1 change: 1 addition & 0 deletions iOS/Layover/Layover/Scenes/Home/HomeRouter.swift
Original file line number Diff line number Diff line change
@@ -37,6 +37,7 @@ final class HomeRouter: NSObject, HomeRoutingLogic, HomeDataPassing {
let destination = playbackViewController.router?.dataStore
else { return }
destination.parentView = .home
destination.index = source.index
destination.videos = transDTO(videos: source.videos ?? [])
viewController?.navigationController?.pushViewController(playbackViewController, animated: true)
}
14 changes: 10 additions & 4 deletions iOS/Layover/Layover/Scenes/Playback/PlaybackInteractor.swift
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ import UIKit

protocol PlaybackBusinessLogic {
func displayVideoList()
func setCellIfInfinite()
func moveInitialPlaybackCell()
func hidePlayerSlider()
func moveCellIfInfinite(with request: PlaybackModels.DisplayPlaybackVideo.Request)
func setInitialPlaybackCell()
@@ -22,6 +22,7 @@ protocol PlaybackDataStore: AnyObject {
var videos: [PlaybackModels.Board]? { get set }
var parentView: PlaybackModels.ParentView? { get set }
var prevCell: PlaybackCell? { get set }
var index: Int? { get set }
}

final class PlaybackInteractor: PlaybackBusinessLogic, PlaybackDataStore {
@@ -35,6 +36,7 @@ final class PlaybackInteractor: PlaybackBusinessLogic, PlaybackDataStore {
var videos: [Models.Board]?
var parentView: Models.ParentView?
var prevCell: PlaybackCell?
var index: Int?

func displayVideoList() {
guard let parentView: Models.ParentView else {
@@ -50,9 +52,12 @@ final class PlaybackInteractor: PlaybackBusinessLogic, PlaybackDataStore {
presenter?.presentVideoList(with: response)
}

func setCellIfInfinite() {
func moveInitialPlaybackCell() {
let response: Models.SetInitialPlaybackCell.Response = Models.SetInitialPlaybackCell.Response(indexPathRow: index ?? 0)
if parentView == .other {
presenter?.presentSetCellIfInfinite()
} else {
presenter?.presentMoveInitialPlaybackCell(with: response)
}
}

@@ -61,12 +66,13 @@ final class PlaybackInteractor: PlaybackBusinessLogic, PlaybackDataStore {

func setInitialPlaybackCell() {
guard let parentView else { return }
guard let index else { return }
let response: Models.SetInitialPlaybackCell.Response
switch parentView {
case .home:
response = Models.SetInitialPlaybackCell.Response(indexPathRow: 0)
response = Models.SetInitialPlaybackCell.Response(indexPathRow: index)
case .other:
response = Models.SetInitialPlaybackCell.Response(indexPathRow: 1)
response = Models.SetInitialPlaybackCell.Response(indexPathRow: index + 1)
}
presenter?.presentSetInitialPlaybackCell(with: response)
}
2 changes: 1 addition & 1 deletion iOS/Layover/Layover/Scenes/Playback/PlaybackModels.swift
Original file line number Diff line number Diff line change
@@ -60,7 +60,7 @@ enum PlaybackModels {

enum SetInitialPlaybackCell {
struct Request {

let indexPathRow: Int
}

struct Response {
8 changes: 7 additions & 1 deletion iOS/Layover/Layover/Scenes/Playback/PlaybackPresenter.swift
Original file line number Diff line number Diff line change
@@ -17,6 +17,7 @@ protocol PlaybackPresentationLogic {
func presentPlayInitialPlaybackCell(with response: PlaybackModels.DisplayPlaybackVideo.Response)
func presentHidePlayerSlider(with response: PlaybackModels.DisplayPlaybackVideo.Response)
func presentShowPlayerSlider(with response: PlaybackModels.DisplayPlaybackVideo.Response)
func presentMoveInitialPlaybackCell(with response: PlaybackModels.SetInitialPlaybackCell.Response)
}

final class PlaybackPresenter: PlaybackPresentationLogic {
@@ -26,7 +27,7 @@ final class PlaybackPresenter: PlaybackPresentationLogic {
typealias Models = PlaybackModels
weak var viewController: PlaybackDisplayLogic?

// MARK: - UseCase 비디오 목록 출력
// MARK: - UseCase

func presentVideoList(with response: PlaybackModels.LoadPlaybackVideoList.Response) {
let viewModel: Models.LoadPlaybackVideoList.ViewModel = Models.LoadPlaybackVideoList.ViewModel(videos: response.videos)
@@ -51,6 +52,11 @@ final class PlaybackPresenter: PlaybackPresentationLogic {
viewController?.setInitialPlaybackCell(viewModel: viewModel)
}

func presentMoveInitialPlaybackCell(with response: PlaybackModels.SetInitialPlaybackCell.Response) {
let viewModel: Models.SetInitialPlaybackCell.ViewModel = Models.SetInitialPlaybackCell.ViewModel(indexPathRow: response.indexPathRow)
viewController?.moveInitialPlaybackCell(viewModel: viewModel)
}

func presentPlayInitialPlaybackCell(with response: PlaybackModels.DisplayPlaybackVideo.Response) {
let viewModel: Models.DisplayPlaybackVideo.ViewModel = Models.DisplayPlaybackVideo.ViewModel(prevCell: nil, curCell: response.curCell)
viewController?.stopPrevPlayerAndPlayCurPlayer(viewModel: viewModel)
Original file line number Diff line number Diff line change
@@ -14,6 +14,7 @@ protocol PlaybackDisplayLogic: AnyObject {
func displayMoveCellIfinfinite()
func stopPrevPlayerAndPlayCurPlayer(viewModel: PlaybackModels.DisplayPlaybackVideo.ViewModel)
func setInitialPlaybackCell(viewModel: PlaybackModels.SetInitialPlaybackCell.ViewModel)
func moveInitialPlaybackCell(viewModel: PlaybackModels.SetInitialPlaybackCell.ViewModel)
func hidePlayerSlider(viewModel: PlaybackModels.DisplayPlaybackVideo.ViewModel)
func showPlayerSlider(viewModel: PlaybackModels.DisplayPlaybackVideo.ViewModel)
}
@@ -93,7 +94,7 @@ final class PlaybackViewController: BaseViewController {

override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
interactor?.setCellIfInfinite()
interactor?.moveInitialPlaybackCell()
}

// MARK: - UI + Layout
@@ -153,6 +154,11 @@ extension PlaybackViewController: PlaybackDisplayLogic {
curCell.playbackView.playerSlider.isHidden = false
}
}

func moveInitialPlaybackCell(viewModel: PlaybackModels.SetInitialPlaybackCell.ViewModel) {
let willMoveLocation: CGFloat = CGFloat(viewModel.indexPathRow) * playbackCollectionView.bounds.height
playbackCollectionView.setContentOffset(.init(x: playbackCollectionView.contentOffset.x, y: willMoveLocation), animated: false)
}
}

// MARK: - Playback Method