Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
20 changes: 10 additions & 10 deletions Poppool/Poppool.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,8 @@
086F89D52D1E6DB100CA4FC9 /* OtherUserCommentController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 086F89D42D1E6DB100CA4FC9 /* OtherUserCommentController.swift */; };
086F89D72D1E6DB700CA4FC9 /* OtherUserCommentReactor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 086F89D62D1E6DB700CA4FC9 /* OtherUserCommentReactor.swift */; };
086F89D92D1E79E200CA4FC9 /* GetOtherUserCommentListRequestDTO.swift in Sources */ = {isa = PBXBuildFile; fileRef = 086F89D82D1E79E200CA4FC9 /* GetOtherUserCommentListRequestDTO.swift */; };
086F89DB2D1E7A6C00CA4FC9 /* GetOtherUserCommentListResponseDTO.swift in Sources */ = {isa = PBXBuildFile; fileRef = 086F89DA2D1E7A6C00CA4FC9 /* GetOtherUserCommentListResponseDTO.swift */; };
086F89E02D1E7CC700CA4FC9 /* GetOtherUserCommentListResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 086F89DF2D1E7CC700CA4FC9 /* GetOtherUserCommentListResponse.swift */; };
086F89DB2D1E7A6C00CA4FC9 /* GetOtherUserCommentedPopUpListResponseDTO.swift in Sources */ = {isa = PBXBuildFile; fileRef = 086F89DA2D1E7A6C00CA4FC9 /* GetOtherUserCommentedPopUpListResponseDTO.swift */; };
086F89E02D1E7CC700CA4FC9 /* GetOtherUserCommentedPopUpListResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 086F89DF2D1E7CC700CA4FC9 /* GetOtherUserCommentedPopUpListResponse.swift */; };
086F89E42D1FE91300CA4FC9 /* OtherUserCommentSection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 086F89E32D1FE91300CA4FC9 /* OtherUserCommentSection.swift */; };
086F89E62D1FE91800CA4FC9 /* OtherUserCommentSectionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 086F89E52D1FE91800CA4FC9 /* OtherUserCommentSectionCell.swift */; };
086F89EA2D2009E300CA4FC9 /* SubLoginView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 086F89E92D2009E300CA4FC9 /* SubLoginView.swift */; };
Expand Down Expand Up @@ -707,8 +707,8 @@
086F89D42D1E6DB100CA4FC9 /* OtherUserCommentController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OtherUserCommentController.swift; sourceTree = "<group>"; };
086F89D62D1E6DB700CA4FC9 /* OtherUserCommentReactor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OtherUserCommentReactor.swift; sourceTree = "<group>"; };
086F89D82D1E79E200CA4FC9 /* GetOtherUserCommentListRequestDTO.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GetOtherUserCommentListRequestDTO.swift; sourceTree = "<group>"; };
086F89DA2D1E7A6C00CA4FC9 /* GetOtherUserCommentListResponseDTO.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GetOtherUserCommentListResponseDTO.swift; sourceTree = "<group>"; };
086F89DF2D1E7CC700CA4FC9 /* GetOtherUserCommentListResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GetOtherUserCommentListResponse.swift; sourceTree = "<group>"; };
086F89DA2D1E7A6C00CA4FC9 /* GetOtherUserCommentedPopUpListResponseDTO.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GetOtherUserCommentedPopUpListResponseDTO.swift; sourceTree = "<group>"; };
086F89DF2D1E7CC700CA4FC9 /* GetOtherUserCommentedPopUpListResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GetOtherUserCommentedPopUpListResponse.swift; sourceTree = "<group>"; };
086F89E32D1FE91300CA4FC9 /* OtherUserCommentSection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OtherUserCommentSection.swift; sourceTree = "<group>"; };
086F89E52D1FE91800CA4FC9 /* OtherUserCommentSectionCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OtherUserCommentSectionCell.swift; sourceTree = "<group>"; };
086F89E92D2009E300CA4FC9 /* SubLoginView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SubLoginView.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -2048,7 +2048,7 @@
086F89DD2D1E7A7A00CA4FC9 /* ResponseDTO */ = {
isa = PBXGroup;
children = (
086F89DA2D1E7A6C00CA4FC9 /* GetOtherUserCommentListResponseDTO.swift */,
086F89DA2D1E7A6C00CA4FC9 /* GetOtherUserCommentedPopUpListResponseDTO.swift */,
081898C22D30AE2C0067BF01 /* GetMyProfileResponseDTO.swift */,
086F89F62D226DF600CA4FC9 /* GetMyPageResponseDTO.swift */,
081898AD2D2CFC230067BF01 /* GetWithdrawlListResponseDTO.swift */,
Expand All @@ -2064,7 +2064,7 @@
086F89DE2D1E7CBE00CA4FC9 /* UserAPI */ = {
isa = PBXGroup;
children = (
086F89DF2D1E7CC700CA4FC9 /* GetOtherUserCommentListResponse.swift */,
086F89DF2D1E7CC700CA4FC9 /* GetOtherUserCommentedPopUpListResponse.swift */,
086F89F82D226EEB00CA4FC9 /* GetMyPageResponse.swift */,
081898AF2D2CFCA40067BF01 /* GetWithdrawlListResponse.swift */,
081898C42D30AEF40067BF01 /* GetMyProfileResponse.swift */,
Expand Down Expand Up @@ -3384,7 +3384,7 @@
086F89D72D1E6DB700CA4FC9 /* OtherUserCommentReactor.swift in Sources */,
083C867A2D0EE3BB003F441C /* CommentAPIUseCaseImpl.swift in Sources */,
4E7823A82D2E84E800AC5110 /* AdminRepository.swift in Sources */,
086F89DB2D1E7A6C00CA4FC9 /* GetOtherUserCommentListResponseDTO.swift in Sources */,
086F89DB2D1E7A6C00CA4FC9 /* GetOtherUserCommentedPopUpListResponseDTO.swift in Sources */,
086F89D32D1E6DA600CA4FC9 /* OtherUserCommentView.swift in Sources */,
4E685ECE2D12CEB6001EF91C /* BalloonBackgroundView.swift in Sources */,
4E755B292D2BA65A00ADFB21 /* AdminReactor.swift in Sources */,
Expand Down Expand Up @@ -3442,7 +3442,7 @@
08B191912CF4A00E0057BC04 /* SignUpStep3Reactor.swift in Sources */,
083A259C2CF362090099B58E /* InOutputable.swift in Sources */,
089952642D0366DA0022AEF9 /* SearchMainReactor.swift in Sources */,
086F89E02D1E7CC700CA4FC9 /* GetOtherUserCommentListResponse.swift in Sources */,
086F89E02D1E7CC700CA4FC9 /* GetOtherUserCommentedPopUpListResponse.swift in Sources */,
BD9103652CF6149D00BBCCAE /* HomeAPIEndpoint.swift in Sources */,
086DD8E32CFF356300B97D3B /* HomeCardGridSection.swift in Sources */,
0841BABE2CFB5AA600049E31 /* Date?+.swift in Sources */,
Expand Down Expand Up @@ -3842,7 +3842,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.3;
MARKETING_VERSION = 1.0.4;
PRODUCT_BUNDLE_IDENTIFIER = com.poppoolIOS.poppool;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
Expand Down Expand Up @@ -3880,7 +3880,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.3;
MARKETING_VERSION = 1.0.4;
PRODUCT_BUNDLE_IDENTIFIER = com.poppoolIOS.poppool;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
//
// GetOtherUserCommentedPopUpListResponseDTO.swift
// Poppool
//
// Created by SeoJunYoung on 12/27/24.
//

import Foundation

struct GetOtherUserCommentedPopUpListResponseDTO: Decodable {
var popUpInfoList: [GetOtherUserCommentedPopUpResponseDTO]
}

extension GetOtherUserCommentedPopUpListResponseDTO {
func toDomain() -> GetOtherUserCommentedPopUpListResponse {
return .init(popUpInfoList: popUpInfoList.map { $0.toDomain() })
}
}

struct GetOtherUserCommentedPopUpResponseDTO: Decodable {
var popUpStoreId: Int64
var popUpStoreName: String?
var desc: String?
var mainImageUrl: String?
var startDate: String?
var endDate: String?
var address: String?
var closedYn: Bool
}

extension GetOtherUserCommentedPopUpResponseDTO {
func toDomain() -> GetOtherUserCommentedPopUpResponse {
return .init(
popUpStoreId: popUpStoreId,
popUpStoreName: popUpStoreName,
desc: desc,
mainImageUrl: mainImageUrl,
startDate: startDate.toDate().toPPDateString(),
endDate: endDate.toDate().toPPDateString(),
address: address,
closedYn: closedYn
)
}
}



2 changes: 1 addition & 1 deletion Poppool/Poppool/Data/Network/UserAPI/UserAPIEndPoint.swift
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ struct UserAPIEndPoint {
)
}

static func getOtherUserCommentList(request: GetOtherUserCommentListRequestDTO) -> Endpoint<GetOtherUserCommentListResponseDTO> {
static func getOtherUserCommentPopUpList(request: GetOtherUserCommentListRequestDTO) -> Endpoint<GetOtherUserCommentedPopUpListResponseDTO> {
return Endpoint(
baseURL: Secrets.popPoolBaseUrl.rawValue,
path: "/users/\(request.commenterId ?? "")/comments",
Expand Down
4 changes: 2 additions & 2 deletions Poppool/Poppool/Data/Repository/UserAPIRepositoryImpl.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ final class UserAPIRepositoryImpl {
return provider.request(with: endPoint, interceptor: tokenInterceptor)
}

func getOtherUserCommentList(request: GetOtherUserCommentListRequestDTO) -> Observable<GetOtherUserCommentListResponseDTO> {
let endPoint = UserAPIEndPoint.getOtherUserCommentList(request: request)
func getOtherUserCommentList(request: GetOtherUserCommentListRequestDTO) -> Observable<GetOtherUserCommentedPopUpListResponseDTO> {
let endPoint = UserAPIEndPoint.getOtherUserCommentPopUpList(request: request)
return provider.requestData(with: endPoint, interceptor: tokenInterceptor)
}

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
//
// GetOtherUserCommentedPopUpListResponse.swift
// Poppool
//
// Created by SeoJunYoung on 12/27/24.
//

import Foundation

struct GetOtherUserCommentedPopUpListResponse {
var popUpInfoList: [GetOtherUserCommentedPopUpResponse]
}

struct GetOtherUserCommentedPopUpResponse {
var popUpStoreId: Int64
var popUpStoreName: String?
var desc: String?
var mainImageUrl: String?
var startDate: String?
var endDate: String?
var address: String?
var closedYn: Bool
}
4 changes: 2 additions & 2 deletions Poppool/Poppool/Domain/UseCase/UserAPIUseCaseImpl.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ final class UserAPIUseCaseImpl {
return repository.deleteUserBlock(request: .init(blockedUserId: blockedUserId))
}

func getOtherUserCommentList(
func getOtherUserCommentedPopUpList(
commenterId: String?,
commentType: String?,
page: Int32?,
size: Int32?,
sort: String?
) -> Observable<GetOtherUserCommentListResponse> {
) -> Observable<GetOtherUserCommentedPopUpListResponse> {
return repository.getOtherUserCommentList(
request: .init(
commenterId: commenterId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,12 @@ final class CommentListReactor: Reactor {
controller.present(nextController, animated: true)
case .presentCommentMenuScene(let controller, let row):
let comment = commentSection.inputDataList[row]
// 분기 필요합니다~!~!
showOtherUserCommentMenu(controller: controller, comment: comment)
if comment.isMyComment {
showMyCommentMenu(controller: controller, comment: comment)
} else {
showOtherUserCommentMenu(controller: controller, comment: comment)
}

}
return newState
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ final class OtherUserCommentController: BaseViewController, View {

private var sections: [any Sectionable] = []

private let pageChange: PublishSubject<Void> = .init()

private let cellTapped: PublishSubject<Int> = .init()
}

Expand All @@ -46,6 +44,7 @@ extension OtherUserCommentController {
private extension OtherUserCommentController {
func setUp() {
view.addSubview(mainView)
view.backgroundColor = .g50
mainView.snp.makeConstraints { make in
make.edges.equalTo(view.safeAreaLayoutGuide)
}
Expand All @@ -65,8 +64,8 @@ private extension OtherUserCommentController {
forCellWithReuseIdentifier: SpacingSectionCell.identifiers
)
mainView.contentCollectionView.register(
OtherUserCommentSectionCell.self,
forCellWithReuseIdentifier: OtherUserCommentSectionCell.identifiers
MyCommentedPopUpGridSectionCell.self,
forCellWithReuseIdentifier: MyCommentedPopUpGridSectionCell.identifiers
)
}
}
Expand All @@ -87,12 +86,6 @@ extension OtherUserCommentController {
.bind(to: reactor.action)
.disposed(by: disposeBag)

pageChange
.throttle(.milliseconds(1000), scheduler: MainScheduler.asyncInstance)
.map { Reactor.Action.changePage }
.bind(to: reactor.action)
.disposed(by: disposeBag)

cellTapped
.withUnretained(self)
.map { (owner, row) in
Expand Down Expand Up @@ -129,15 +122,6 @@ extension OtherUserCommentController: UICollectionViewDelegate, UICollectionView
return cell
}

func scrollViewDidScroll(_ scrollView: UIScrollView) {
let contentHeight = scrollView.contentSize.height
let scrollViewHeight = scrollView.frame.size.height
let contentOffsetY = scrollView.contentOffset.y
if contentOffsetY + scrollViewHeight >= contentHeight {
pageChange.onNext(())
}
}

func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
if indexPath.section == 3 { cellTapped.onNext(indexPath.row) }
}
Expand Down
Loading