Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
c97ffc5
[Fix] #196 - 프로그레스바 적용 값 수정
JinUng41 May 22, 2025
2b458d4
[Fix] #196 - 프로필 인포 터치 시 글 상세페이지로 이동하는 것 막기
JinUng41 May 22, 2025
20fbfc1
[Fix] #196 - 네비게이션 팝 제스처 코드 수정
JinUng41 May 22, 2025
11980d4
[Fix] #196 - 뷰잇 밴 후 다시 리스트 받도록 수정
JinUng41 May 22, 2025
6cb598c
[Feat] #196 - 뷰잇 프로필 이동 추가
JinUng41 May 23, 2025
4ce2bcc
[Chore] #196 - 폴더링
JinUng41 May 23, 2025
c1afc3c
[Feat] #196 - 마이페이지 글, 댓글 삭제 기능 구현
JinUng41 May 23, 2025
8fbe787
[Fix] #196 - 댓글 셀이 보이지 않는 문제 해결
JinUng41 May 23, 2025
95d6c28
[Chore] #196 - 오타 수정
JinUng41 May 23, 2025
8c370ce
[Feat] #196 - 마이페이지 글, 댓글 좋아요 구현
JinUng41 May 23, 2025
d94340a
[Chore] #196 - 메서드명 수정
JinUng41 May 23, 2025
303a6bf
[Refactor] #196 - 프로필 컴바인 기반 코드 수정
JinUng41 May 23, 2025
3adbe3d
[Chore] #196 - 지역 변수명 변경
JinUng41 May 23, 2025
38c8e3e
[Feat] #196 - 다른 사람 프로필 좋아요 구현
JinUng41 May 23, 2025
4bc19ff
[Feat] #196 - 상대방 프로필 신고하기, 밴하기 기능 추가
JinUng41 May 23, 2025
17a9779
[Feat] #196 - 다른 사람 프로필 투명도 내리기 기능 구현
JinUng41 May 23, 2025
9b6c843
[Fix] #196 - 뷰잇 신고 후, 동작 수정
JinUng41 May 23, 2025
1ddc361
[Fix] #196 - 프로필 레벨 배지 이미지 적용
JinUng41 May 23, 2025
2f7d261
[Chore] #196 - 사용하지 않는 코드 삭제
JinUng41 May 23, 2025
98b555c
[Chore] #196 - 코드 다듬기
JinUng41 May 23, 2025
6b1a4f0
[Refactor] #196 - 모델명 변경
JinUng41 May 23, 2025
c0b012b
[Chore] #196 - 잘못된 개행 수정
JinUng41 May 24, 2025
93b412c
[Style] #196 - 이미지 표현 방식 수정
JinUng41 May 24, 2025
a949f3e
[Add] #196 - 레벨 뱃지 이미지 추가
youz2me May 24, 2025
817022e
Merge branch 'fix/#196-profile-improvements' of https://github.com/Te…
JinUng41 May 24, 2025
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
18 changes: 13 additions & 5 deletions Wable-iOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@
DEA10B582DD3E53A001EBBA9 /* MyProfileViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEA10B572DD3E53A001EBBA9 /* MyProfileViewController.swift */; };
DEA10B5A2DD3E8E9001EBBA9 /* ProfileViewItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEA10B592DD3E8E9001EBBA9 /* ProfileViewItem.swift */; };
DEA10B5C2DD3F21F001EBBA9 /* ProfileSegmentedHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEA10B5B2DD3F21F001EBBA9 /* ProfileSegmentedHeaderView.swift */; };
DEA10B5E2DD3F48E001EBBA9 /* ProfileSegmentKind.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEA10B5D2DD3F48E001EBBA9 /* ProfileSegmentKind.swift */; };
DEA10B5E2DD3F48E001EBBA9 /* ProfileSegment.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEA10B5D2DD3F48E001EBBA9 /* ProfileSegment.swift */; };
DEA9E7152DA92E7100D35646 /* CommunityView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEA9E7142DA92E7100D35646 /* CommunityView.swift */; };
DEA9E7172DA955CA00D35646 /* CommunityRegisterCompleteViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEA9E7162DA955CA00D35646 /* CommunityRegisterCompleteViewController.swift */; };
DEAFE0512D8C44810097E91C /* GameScheduleListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEAFE0502D8C44810097E91C /* GameScheduleListViewController.swift */; };
Expand Down Expand Up @@ -645,7 +645,7 @@
DEA10B572DD3E53A001EBBA9 /* MyProfileViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyProfileViewController.swift; sourceTree = "<group>"; };
DEA10B592DD3E8E9001EBBA9 /* ProfileViewItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileViewItem.swift; sourceTree = "<group>"; };
DEA10B5B2DD3F21F001EBBA9 /* ProfileSegmentedHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileSegmentedHeaderView.swift; sourceTree = "<group>"; };
DEA10B5D2DD3F48E001EBBA9 /* ProfileSegmentKind.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileSegmentKind.swift; sourceTree = "<group>"; };
DEA10B5D2DD3F48E001EBBA9 /* ProfileSegment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileSegment.swift; sourceTree = "<group>"; };
DEA9E7142DA92E7100D35646 /* CommunityView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommunityView.swift; sourceTree = "<group>"; };
DEA9E7162DA955CA00D35646 /* CommunityRegisterCompleteViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommunityRegisterCompleteViewController.swift; sourceTree = "<group>"; };
DEAFE0502D8C44810097E91C /* GameScheduleListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GameScheduleListViewController.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1665,6 +1665,14 @@
path = ViewModel;
sourceTree = "<group>";
};
DE4EFCCF2DE0060700E4146C /* Edit */ = {
isa = PBXGroup;
children = (
DD51A44B2DD458A8004295B6 /* ProfileEditViewController.swift */,
);
path = Edit;
sourceTree = "<group>";
};
DE59BB952D8A9D130040ADCB /* Home */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -1719,11 +1727,11 @@
DE59BBA52D8A9DD50040ADCB /* Profile */ = {
isa = PBXGroup;
children = (
DD51A44B2DD458A8004295B6 /* ProfileEditViewController.swift */,
DEF08E212DDB45480024B33C /* Model */,
DEF08E202DDB45380024B33C /* Component */,
DEDFCECF2DDC542000B3CD97 /* Other */,
DEA10B522DD3E43A001EBBA9 /* My */,
DE4EFCCF2DE0060700E4146C /* Edit */,
DE3908CA2DD2622400997ABE /* AlarmSetting */,
DEB60AEC2DD20B7E00FE8BFD /* AccountInfo */,
DEA10B282DD38C48001EBBA9 /* Withdrawal */,
Expand Down Expand Up @@ -2336,7 +2344,7 @@
DEF08E212DDB45480024B33C /* Model */ = {
isa = PBXGroup;
children = (
DEA10B5D2DD3F48E001EBBA9 /* ProfileSegmentKind.swift */,
DEA10B5D2DD3F48E001EBBA9 /* ProfileSegment.swift */,
DEA10B592DD3E8E9001EBBA9 /* ProfileViewItem.swift */,
DEF08E282DDB73200024B33C /* ProfileEmptyCellItem.swift */,
);
Expand Down Expand Up @@ -2802,7 +2810,7 @@
DE54B0402D832E78009A7C34 /* LoadingViewController.swift in Sources */,
DD2968282D6DAD0B00143851 /* InformationMapper.swift in Sources */,
DD2968292D6DAD0B00143851 /* WableError.swift in Sources */,
DEA10B5E2DD3F48E001EBBA9 /* ProfileSegmentKind.swift in Sources */,
DEA10B5E2DD3F48E001EBBA9 /* ProfileSegment.swift in Sources */,
DD29682A2D6DAD0B00143851 /* ErrorMapper.swift in Sources */,
DD9EAE302D9A64A800803A1A /* HomeDetailViewController.swift in Sources */,
DD29682B2D6DAD0B00143851 /* CommentMapper.swift in Sources */,
Expand Down
6 changes: 6 additions & 0 deletions Wable-iOS/App/AppDelegate+InjectDependency.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,11 @@ extension AppDelegate {
// MARK: - Profile

diContainer.register(for: ProfileRepository.self, object: ProfileRepositoryImpl())

// MARK: - Ghost

diContainer.register(for: GhostRepository.self) { config in
return GhostRepositoryImpl()
}
}
}
4 changes: 2 additions & 2 deletions Wable-iOS/Data/Mapper/CommentMapper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ enum CommentMapper { }
extension CommentMapper {
static func toDomain(_ response: [DTO.Response.FetchUserComments]) -> [UserComment] {
let dateFormatter = DateFormatter()
dateFormatter.dateFormat = "yyyy-MM-dd HH:mm:dd"
dateFormatter.dateFormat = "yyyy-MM-dd HH:mm:ss"
dateFormatter.timeZone = TimeZone(abbreviation: "KST")

return response.map { comment in
Expand Down Expand Up @@ -54,7 +54,7 @@ extension CommentMapper {

static func toDomain(_ response: [DTO.Response.FetchContentComments]) -> [ContentComment] {
let dateFormatter = DateFormatter()
dateFormatter.dateFormat = "yyyy-MM-dd HH:mm:SS"
dateFormatter.dateFormat = "yyyy-MM-dd HH:mm:ss"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SS로 하지 않아도 상관 없나요? 뭔가 항상 대문자와 소문자를 교차로 사용했던 것 같은데 아니어도 괜찮은거였나 보군요 ,,,

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

제가 알기로는 SS는 잘못된 표현 방식으로 알고 있습니다.
대문자로 표기되는 것들은 그 만의 형식?(24시간/12시간)이 있어서 사용하는 것으로 알고 있어요.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

그랬군요 🫨 모르고 살뻔 했네요 ,,, 감사합니닷.

image


return response.map { comment in
let url = URL(string: comment.memberProfileURL)
Expand Down
15 changes: 15 additions & 0 deletions Wable-iOS/Data/RepositoryImpl/CommentRepositoryImpl.swift
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,17 @@ extension CommentRepositoryImpl: CommentRepository {
.mapWableError()
}

func deleteComment(commentID: Int) async throws {
do {
_ = try await provider.request(
.deleteComment(commentID: commentID),
for: DTO.Response.Empty.self
)
} catch {
throw ErrorMapper.map(error)
}
}

func createComment(contentID: Int, text: String, parentID: Int?, parentMemberID: Int?) -> AnyPublisher<Void, WableError> {
return provider.request(
.createComment(
Expand Down Expand Up @@ -104,6 +115,10 @@ struct MockCommentRepository: CommentRepository {
.fail(.unknownError)
}

func deleteComment(commentID: Int) async throws {
throw WableError.unknownError
}

func createComment(contentID: Int, text: String, parentID: Int?, parentMemberID: Int?) -> AnyPublisher<Void, WableError> {
.fail(.unknownError)
}
Expand Down
25 changes: 25 additions & 0 deletions Wable-iOS/Data/RepositoryImpl/ContentLikedRepositoryImpl.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,20 @@ extension ContentLikedRepositoryImpl: ContentLikedRepository {
.mapWableError()
}

func createContentLiked(contentID: Int, triggerType: String) async throws {
do {
_ = try await provider.request(
.createContentLiked(
contentID: contentID,
request: DTO.Request.CreateContentLiked(alarmTriggerType: triggerType)
),
for: DTO.Response.Empty.self
)
} catch {
throw ErrorMapper.map(error)
}
}

func deleteContentLiked(contentID: Int) -> AnyPublisher<Void, WableError> {
return provider.request(
.deleteContentLiked(contentID: contentID),
Expand All @@ -37,4 +51,15 @@ extension ContentLikedRepositoryImpl: ContentLikedRepository {
.asVoid()
.mapWableError()
}

func deleteContentLiked(contentID: Int) async throws {
do {
_ = try await provider.request(
.deleteContentLiked(contentID: contentID),
for: DTO.Response.Empty.self
)
} catch {
throw ErrorMapper.map(error)
}
}
}
11 changes: 11 additions & 0 deletions Wable-iOS/Data/RepositoryImpl/ContentRepositoryImpl.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,17 @@ extension ContentRepositoryImpl: ContentRepository {
.mapWableError()
}

func deleteContent(contentID: Int) async throws {
do {
_ = try await provider.request(
.deleteContent(contentID: contentID),
for: DTO.Response.Empty.self
)
} catch {
throw ErrorMapper.map(error)
}
}

func fetchContentInfo(contentID: Int) -> AnyPublisher<ContentInfo, WableError> {
provider.request(
.fetchContentInfo(contentID: contentID),
Expand Down
23 changes: 23 additions & 0 deletions Wable-iOS/Data/RepositoryImpl/GhostRepositoryImpl.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,27 @@ final class GhostRepositoryImpl: GhostRepository {
.asVoid()
.mapWableError()
}

func postGhostReduction(
alarmTriggerType: String,
alarmTriggerID: Int,
targetMemberID: Int,
reason: String
) async throws {
let request = DTO.Request.UpdateGhost(
alarmTriggerType: alarmTriggerType,
targetMemberID: targetMemberID,
alarmTriggerID: alarmTriggerID,
ghostReason: reason
)

do {
_ = try await provider.request(
.ghostReduction(request: request),
for: DTO.Response.Empty.self
)
} catch {
throw ErrorMapper.map(error)
}
}
}
41 changes: 41 additions & 0 deletions Wable-iOS/Data/RepositoryImpl/ReportRepositoryImpl.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,22 @@ extension ReportRepositoryImpl: ReportRepository {
.mapWableError()
}

func createReport(nickname: String, text: String) async throws {
do {
_ = try await provider.request(
.createReport(
request: DTO.Request.CreateReport(
reportTargetNickname: nickname,
relateText: text
)
),
for: DTO.Response.Empty.self
)
} catch {
throw ErrorMapper.map(error)
}
}

func createBan(memberID: Int, triggerType: TriggerType.Ban, triggerID: Int) -> AnyPublisher<Void, WableError> {
return provider.request(
.createBan(
Expand All @@ -45,6 +61,23 @@ extension ReportRepositoryImpl: ReportRepository {
.asVoid()
.mapWableError()
}

func createBan(memberID: Int, triggerType: TriggerType.Ban, triggerID: Int) async throws {
do {
_ = try await provider.request(
.createBan(
request: DTO.Request.CreateBan(
memberID: memberID,
triggerType: triggerType.rawValue,
triggerID: triggerID
)
),
for: DTO.Response.Empty.self
)
} catch {
throw ErrorMapper.map(error)
}
}
}

// MARK: - Mock
Expand All @@ -58,9 +91,17 @@ struct MockReportRepository: ReportRepository {
.eraseToAnyPublisher()
}

func createReport(nickname: String, text: String) async throws {

}

func createBan(memberID: Int, triggerType: TriggerType.Ban, triggerID: Int) -> AnyPublisher<Void, WableError> {
return .just(())
.delay(for: .seconds(delaySeconds), scheduler: RunLoop.main)
.eraseToAnyPublisher()
}

func createBan(memberID: Int, triggerType: TriggerType.Ban, triggerID: Int) async throws {

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ protocol CommentRepository {
func fetchUserCommentList(memberID: Int, cursor: Int) async throws -> [UserComment]
func fetchContentCommentList(contentID: Int, cursor: Int) -> AnyPublisher<[ContentComment], WableError>
func deleteComment(commentID: Int) -> AnyPublisher<Void, WableError>
func deleteComment(commentID: Int) async throws
func createComment(contentID: Int, text: String, parentID: Int?, parentMemberID: Int?) -> AnyPublisher<Void, WableError>
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@ import Foundation

protocol ContentLikedRepository {
func createContentLiked(contentID: Int, triggerType: String) -> AnyPublisher<Void, WableError>
func createContentLiked(contentID: Int, triggerType: String) async throws
func deleteContentLiked(contentID: Int) -> AnyPublisher<Void, WableError>
func deleteContentLiked(contentID: Int) async throws
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import Foundation
protocol ContentRepository {
func createContent(title: String, text: String, image: Data?) -> AnyPublisher<Void, WableError>
func deleteContent(contentID: Int) -> AnyPublisher<Void, WableError>
func deleteContent(contentID: Int) async throws
func fetchContentInfo(contentID: Int) -> AnyPublisher<ContentInfo, WableError>
func fetchContentList(cursor: Int) -> AnyPublisher<[Content], WableError>
func fetchUserContentList(memberID: Int, cursor: Int) -> AnyPublisher<[UserContent], WableError>
Expand Down
7 changes: 7 additions & 0 deletions Wable-iOS/Domain/RepositoryInterface/GhostRepository.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,11 @@ protocol GhostRepository {
targetMemberID: Int,
reason: String
) -> AnyPublisher<Void, WableError>

func postGhostReduction(
alarmTriggerType: String,
alarmTriggerID: Int,
targetMemberID: Int,
reason: String
) async throws
}
2 changes: 2 additions & 0 deletions Wable-iOS/Domain/RepositoryInterface/ReportRepository.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@ import Foundation

protocol ReportRepository {
func createReport(nickname: String, text: String) -> AnyPublisher<Void, WableError>
func createReport(nickname: String, text: String) async throws
func createBan(memberID: Int, triggerType: TriggerType.Ban, triggerID: Int) -> AnyPublisher<Void, WableError>
func createBan(memberID: Int, triggerType: TriggerType.Ban, triggerID: Int) async throws
}
13 changes: 10 additions & 3 deletions Wable-iOS/Presentation/Home/View/HomeViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ private extension HomeViewController {
}

func setupDataSource() {
let homeCellRegistration = CellRegistration<ContentCollectionViewCell, Content> { [weak self] cell, indexPath, item in
let homeCellRegistration = CellRegistration<ContentCollectionViewCell, Content> {
[weak self] cell, indexPath, item in
guard let self = self else { return }

cell.configureCell(
Expand Down Expand Up @@ -270,8 +271,14 @@ private extension HomeViewController {
viewModel: .init(
userID: item.content.contentInfo.author.id,
fetchUserProfileUseCase: FetchUserProfileUseCaseImpl(),
fetchUserContentListUseCase: FetchUserContentUseCaseImpl(),
fetchUserCommentListUseCase: FetchUserCommentListUseCaseImpl()
checkUserRoleUseCase: CheckUserRoleUseCaseImpl(
repository: UserSessionRepositoryImpl(
userDefaults: UserDefaultsStorage(
jsonEncoder: JSONEncoder(),
jsonDecoder: JSONDecoder()
)
)
)
)
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ final class AnnouncementDetailViewController: UIViewController {
super.viewDidLoad()

setupAction()
setupDelegate()
setupNavigationBar()
}

func configure(
Expand Down Expand Up @@ -83,14 +83,6 @@ final class AnnouncementDetailViewController: UIViewController {
}
}

// MARK: - UIGestureRecognizerDelegate

extension AnnouncementDetailViewController: UIGestureRecognizerDelegate {
func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool {
return navigationController?.viewControllers.count ?? 0 > 1
}
}

// MARK: - Setup Method

private extension AnnouncementDetailViewController {
Expand All @@ -103,8 +95,9 @@ private extension AnnouncementDetailViewController {
submitButton.addTarget(self, action: #selector(submitButtonDidTap), for: .touchUpInside)
}

func setupDelegate() {
navigationController?.interactivePopGestureRecognizer?.delegate = self
func setupNavigationBar() {
navigationController?.navigationBar.isHidden = true
navigationController?.interactivePopGestureRecognizer?.isEnabled = true
Comment on lines -106 to +100
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

}
}

Expand Down
Loading