From 7153470238380ee24bc1c73b4ae55d6efdecb15a Mon Sep 17 00:00:00 2001 From: kong <1018dbrud@gmail.com> Date: Fri, 8 Dec 2023 04:39:33 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20=EC=98=A4=ED=83=88=EC=9E=90=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- iOS/Layover/Layover/Scenes/Map/MapInteractor.swift | 4 ++-- iOS/Layover/Layover/Scenes/Map/MapModels.swift | 4 ++-- iOS/Layover/Layover/Scenes/Map/MapPresenter.swift | 2 +- iOS/Layover/Layover/Scenes/Map/MapWorker.swift | 6 +++--- .../Layover/Scenes/UploadPost/UploadPostInteractor.swift | 2 +- .../Layover/Scenes/UploadPost/UploadPostModels.swift | 4 ++-- .../Layover/Scenes/UploadPost/UploadPostPresenter.swift | 8 ++++---- .../Scenes/UploadPost/UploadPostViewController.swift | 2 +- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/iOS/Layover/Layover/Scenes/Map/MapInteractor.swift b/iOS/Layover/Layover/Scenes/Map/MapInteractor.swift index abf790d..6ce08b1 100644 --- a/iOS/Layover/Layover/Scenes/Map/MapInteractor.swift +++ b/iOS/Layover/Layover/Scenes/Map/MapInteractor.swift @@ -64,7 +64,7 @@ final class MapInteractor: NSObject, MapBusinessLogic, MapDataStore { let posts = await worker?.fetchPosts(latitude: coordinate.latitude, longitude: coordinate.longitude) guard let posts else { return [] } - self.posts = posts.map { .init(member: $0.member, board: $0.board, tag: $0.tag) } + self.posts = posts.map { .init(member: $0.member, board: $0.board, tag: $0.tags) } let response = Models.FetchPosts.Response(posts: posts) await MainActor.run { presenter?.presentFetchedPosts(with: response) @@ -77,7 +77,7 @@ final class MapInteractor: NSObject, MapBusinessLogic, MapDataStore { Task { let posts = await worker?.fetchPosts(latitude: latitude, longitude: longitude) guard let posts else { return [] } - self.posts = posts.map { .init(member: $0.member, board: $0.board, tag: $0.tag) } + self.posts = posts.map { .init(member: $0.member, board: $0.board, tag: $0.tags) } let response = Models.FetchPosts.Response(posts: posts) await MainActor.run { presenter?.presentFetchedPosts(with: response) diff --git a/iOS/Layover/Layover/Scenes/Map/MapModels.swift b/iOS/Layover/Layover/Scenes/Map/MapModels.swift index eff5605..5b52c1c 100644 --- a/iOS/Layover/Layover/Scenes/Map/MapModels.swift +++ b/iOS/Layover/Layover/Scenes/Map/MapModels.swift @@ -13,8 +13,8 @@ enum MapModels { struct Post { let member: Member let board: Board - let tag: [String] - let thumnailImageData: Data + let tags: [String] + let thumbnailImageData: Data } struct DisplayedPost: Hashable { diff --git a/iOS/Layover/Layover/Scenes/Map/MapPresenter.swift b/iOS/Layover/Layover/Scenes/Map/MapPresenter.swift index 8981119..3f1b77b 100644 --- a/iOS/Layover/Layover/Scenes/Map/MapPresenter.swift +++ b/iOS/Layover/Layover/Scenes/Map/MapPresenter.swift @@ -35,7 +35,7 @@ final class MapPresenter: MapPresentationLogic { .map { post -> Models.DisplayedPost? in if let videoURL = post.board.videoURL { return .init(boardID: post.board.identifier, - thumbnailImageData: post.thumnailImageData, + thumbnailImageData: post.thumbnailImageData, videoURL: videoURL, latitude: post.board.latitude, longitude: post.board.longitude) diff --git a/iOS/Layover/Layover/Scenes/Map/MapWorker.swift b/iOS/Layover/Layover/Scenes/Map/MapWorker.swift index 61712fa..dd13c13 100644 --- a/iOS/Layover/Layover/Scenes/Map/MapWorker.swift +++ b/iOS/Layover/Layover/Scenes/Map/MapWorker.swift @@ -34,11 +34,11 @@ final class MapWorker: MapWorkerProtocol { let response = try await provider.request(with: endPoint) guard let data = response.data else { return nil } let posts = try await data.concurrentMap { postDTO -> Models.Post in - let thumnailImageData = try await self.provider.request(url: postDTO.board.videoThumbnailURL) + let thumbnailImageData = try await self.provider.request(url: postDTO.board.videoThumbnailURL) return .init(member: postDTO.member.toDomain(), board: postDTO.board.toDomain(), - tag: postDTO.tag, - thumnailImageData: thumnailImageData) + tags: postDTO.tag, + thumbnailImageData: thumbnailImageData) } return posts } catch { diff --git a/iOS/Layover/Layover/Scenes/UploadPost/UploadPostInteractor.swift b/iOS/Layover/Layover/Scenes/UploadPost/UploadPostInteractor.swift index b3d7fdf..8b98f67 100644 --- a/iOS/Layover/Layover/Scenes/UploadPost/UploadPostInteractor.swift +++ b/iOS/Layover/Layover/Scenes/UploadPost/UploadPostInteractor.swift @@ -74,7 +74,7 @@ final class UploadPostInteractor: NSObject, UploadPostBusinessLogic, UploadPostD do { let image = try await generator.image(at: .zero).image await MainActor.run { - presenter?.presentThumnailImage(with: Models.FetchThumbnail.Response(thumnailImage: image)) + presenter?.presentThumbnailImage(with: Models.FetchThumbnail.Response(thumbnailImage: image)) } return true } catch let error { diff --git a/iOS/Layover/Layover/Scenes/UploadPost/UploadPostModels.swift b/iOS/Layover/Layover/Scenes/UploadPost/UploadPostModels.swift index e722fff..aa13b66 100644 --- a/iOS/Layover/Layover/Scenes/UploadPost/UploadPostModels.swift +++ b/iOS/Layover/Layover/Scenes/UploadPost/UploadPostModels.swift @@ -40,10 +40,10 @@ enum UploadPostModels { } struct Response { - let thumnailImage: CGImage + let thumbnailImage: CGImage } struct ViewModel { - let thumnailImage: UIImage + let thumbnailImage: UIImage } } diff --git a/iOS/Layover/Layover/Scenes/UploadPost/UploadPostPresenter.swift b/iOS/Layover/Layover/Scenes/UploadPost/UploadPostPresenter.swift index f87cef8..7d4510b 100644 --- a/iOS/Layover/Layover/Scenes/UploadPost/UploadPostPresenter.swift +++ b/iOS/Layover/Layover/Scenes/UploadPost/UploadPostPresenter.swift @@ -10,7 +10,7 @@ import UIKit protocol UploadPostPresentationLogic { func presentTags(with response: UploadPostModels.FetchTags.Response) - func presentThumnailImage(with response: UploadPostModels.FetchThumbnail.Response) + func presentThumbnailImage(with response: UploadPostModels.FetchThumbnail.Response) func presentCurrentAddress(with response: UploadPostModels.FetchCurrentAddress.Response) func presentUploadButton(with response: UploadPostModels.CanUploadPost.Response) // func presentUploadProgress(with response: UploadPostModels.UploadPost.Response) @@ -27,9 +27,9 @@ final class UploadPostPresenter: UploadPostPresentationLogic { viewController?.displayTags(viewModel: Models.FetchTags.ViewModel(tags: response.tags)) } - func presentThumnailImage(with response: UploadPostModels.FetchThumbnail.Response) { - let image = UIImage(cgImage: response.thumnailImage) - viewController?.displayThumbnail(viewModel: Models.FetchThumbnail.ViewModel(thumnailImage: image)) + func presentThumbnailImage(with response: UploadPostModels.FetchThumbnail.Response) { + let image = UIImage(cgImage: response.thumbnailImage) + viewController?.displayThumbnail(viewModel: Models.FetchThumbnail.ViewModel(thumbnailImage: image)) } func presentCurrentAddress(with response: UploadPostModels.FetchCurrentAddress.Response) { diff --git a/iOS/Layover/Layover/Scenes/UploadPost/UploadPostViewController.swift b/iOS/Layover/Layover/Scenes/UploadPost/UploadPostViewController.swift index f16890e..0836844 100644 --- a/iOS/Layover/Layover/Scenes/UploadPost/UploadPostViewController.swift +++ b/iOS/Layover/Layover/Scenes/UploadPost/UploadPostViewController.swift @@ -258,7 +258,7 @@ extension UploadPostViewController: UploadPostDisplayLogic { } func displayThumbnail(viewModel: UploadPostModels.FetchThumbnail.ViewModel) { - thumbnailImageView.image = viewModel.thumnailImage + thumbnailImageView.image = viewModel.thumbnailImage } func displayCurrentAddress(viewModel: UploadPostModels.FetchCurrentAddress.ViewModel) {