Skip to content

Commit

Permalink
♻️ 리뷰 사항 반영
Browse files Browse the repository at this point in the history
인환님 리뷰 사항 반영
  • Loading branch information
chopmozzi committed Dec 7, 2023
1 parent 10fc0df commit 7262748
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 19 deletions.
28 changes: 11 additions & 17 deletions iOS/Layover/Layover/Scenes/Playback/PlaybackInteractor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ protocol PlaybackBusinessLogic {
func setSeeMoreButton()
@discardableResult
func deleteVideo(with request: PlaybackModels.DeletePlaybackVideo.Request) -> Task<Bool, Never>
func reRunVideo()
func resumeVideo()
}

protocol PlaybackDataStore: AnyObject {
Expand Down Expand Up @@ -138,24 +138,18 @@ final class PlaybackInteractor: PlaybackBusinessLogic, PlaybackDataStore {
func playTeleportVideo(with request: PlaybackModels.DisplayPlaybackVideo.Request) {
guard let posts else { return }
var response: Models.DisplayPlaybackVideo.Response
if let isTeleport {
if isTeleport {
if request.indexPathRow == 1 || request.indexPathRow == (posts.count - 2) {
response = Models.DisplayPlaybackVideo.Response(prevCell: prevCell, curCell: request.curCell)
prevCell = request.curCell
presenter?.presentMoveCellNext(with: response)
self.isTeleport = false
}
}
}

if let isDelete {
if isDelete {
response = Models.DisplayPlaybackVideo.Response(prevCell: nil, curCell: request.curCell)
if let isTeleport, isTeleport == true, (request.indexPathRow == 1 || request.indexPathRow == (posts.count - 2)) {
response = Models.DisplayPlaybackVideo.Response(prevCell: prevCell, curCell: request.curCell)
prevCell = request.curCell
presenter?.presentMoveCellNext(with: response)
self.isDelete = false
self.isTeleport = false
}

if let isDelete, isDelete == true {
response = Models.DisplayPlaybackVideo.Response(prevCell: nil, curCell: request.curCell)
prevCell = request.curCell
presenter?.presentMoveCellNext(with: response)
self.isDelete = false
}
}

Expand Down Expand Up @@ -217,7 +211,7 @@ final class PlaybackInteractor: PlaybackBusinessLogic, PlaybackDataStore {
}
}

func reRunVideo() {
func resumeVideo() {
guard let prevCell else { return }
prevCell.playbackView.playPlayer()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ final class PlaybackViewController: BaseViewController {
})
let cancelAction: UIAlertAction = UIAlertAction(title: "취소", style: .cancel, handler: {
[weak self] _ in
self?.interactor?.reRunVideo()
self?.interactor?.resumeVideo()
})
alert.addAction(reportAction)
alert.addAction(cancelAction)
Expand All @@ -161,7 +161,7 @@ final class PlaybackViewController: BaseViewController {
})
let cancelAction: UIAlertAction = UIAlertAction(title: "취소", style: .cancel, handler: {
[weak self] _ in
self?.interactor?.reRunVideo()
self?.interactor?.resumeVideo()
})
alert.addAction(deleteAction)
alert.addAction(cancelAction)
Expand Down

0 comments on commit 7262748

Please sign in to comment.