From 10fc0df2b1355891038c8dcc59ec09b356409e78 Mon Sep 17 00:00:00 2001 From: chopmozzi <44396392+chopmozzi@users.noreply.github.com> Date: Thu, 7 Dec 2023 11:28:52 +0900 Subject: [PATCH] =?UTF-8?q?:wrench:=20=ED=94=84=EB=A1=9C=ED=95=84=20?= =?UTF-8?q?=EB=B7=B0=20=EB=AC=B4=ED=95=9C=20=EC=8A=A4=ED=81=AC=EB=A1=A4=20?= =?UTF-8?q?=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Scenes/Playback/PlaybackInteractor.swift | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/iOS/Layover/Layover/Scenes/Playback/PlaybackInteractor.swift b/iOS/Layover/Layover/Scenes/Playback/PlaybackInteractor.swift index 741fcc0..6d1391d 100644 --- a/iOS/Layover/Layover/Scenes/Playback/PlaybackInteractor.swift +++ b/iOS/Layover/Layover/Scenes/Playback/PlaybackInteractor.swift @@ -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 } @@ -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() } } @@ -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) @@ -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 { @@ -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 {