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 b2d1af9 commit 10fc0df
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions iOS/Layover/Layover/Scenes/Playback/PlaybackInteractor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ final class PlaybackInteractor: PlaybackBusinessLogic, PlaybackDataStore {
guard let parentView: Models.ParentView else { return }
guard var posts: [Post] else { return }
guard let worker else { return }
if parentView != .home {
if parentView == .other {
posts = worker.makeInfiniteScroll(posts: posts)
self.posts = posts
}
Expand All @@ -74,9 +74,9 @@ final class PlaybackInteractor: PlaybackBusinessLogic, PlaybackDataStore {
let response: Models.SetInitialPlaybackCell.Response = Models.SetInitialPlaybackCell.Response(indexPathRow: index ?? 0)
guard let parentView else { return }
switch parentView {
case .home:
case .home, .myProfile:
presenter?.presentMoveInitialPlaybackCell(with: response)
case .other, .myProfile:
case .other:
presenter?.presentSetCellIfInfinite()
}
}
Expand All @@ -86,9 +86,9 @@ final class PlaybackInteractor: PlaybackBusinessLogic, PlaybackDataStore {
let index else { return }
let response: Models.SetInitialPlaybackCell.Response
switch parentView {
case .home:
case .home, .myProfile:
response = Models.SetInitialPlaybackCell.Response(indexPathRow: index)
case .other, .myProfile:
case .other:
response = Models.SetInitialPlaybackCell.Response(indexPathRow: index + 1)
}
presenter?.presentSetInitialPlaybackCell(with: response)
Expand All @@ -112,7 +112,7 @@ final class PlaybackInteractor: PlaybackBusinessLogic, PlaybackDataStore {
return
}
// Home이 아닌 다른 뷰에서 왔을 경우(로드한 목록 무한 반복)
if parentView == .other || parentView == .myProfile {
if parentView == .other {
if request.indexPathRow == (posts.count - 1) {
response = Models.DisplayPlaybackVideo.Response(indexPathRow: 1, prevCell: prevCell, curCell: nil)
} else if request.indexPathRow == 0 {
Expand All @@ -136,10 +136,6 @@ final class PlaybackInteractor: PlaybackBusinessLogic, PlaybackDataStore {
}

func playTeleportVideo(with request: PlaybackModels.DisplayPlaybackVideo.Request) {
// guard let isTeleport,
// let posts,
// let isDelete
// else { return }
guard let posts else { return }
var response: Models.DisplayPlaybackVideo.Response
if let isTeleport {
Expand Down

0 comments on commit 10fc0df

Please sign in to comment.