Skip to content

Commit d3c2872

Browse files
authored
[Feature/#266] 마이페이지 진입 시 연락처 차단 개수 동기화 (#267)
* feat: UserInfo blockedContactsCount 추가 * feat: 마이페이지 onLoad시 차단된 전화번호수 동기화
1 parent 737a6da commit d3c2872

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

Projects/Domain/Profile/Interface/Sources/DTO/Response/ProfileResponseDTO.swift

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ public struct ProfileResponseDTO: Decodable {
1313
public let imageUrl: String?
1414
public let age: Int?
1515
public let isMatchActivated: Bool?
16+
public let blockedUserCount: Int?
1617
public let introduction: [IntroductionDTO]?
1718
public let profileSelect: ProfileSelectDTO?
1819

@@ -79,7 +80,8 @@ public struct ProfileResponseDTO: Decodable {
7980
userAge: age ?? -1,
8081
userImageURL: imageUrl ?? "",
8182
userName: userName ?? "",
82-
isActiveMatching: isMatchActivated ?? false
83+
isActiveMatching: isMatchActivated ?? false,
84+
blockedContactsCount: blockedUserCount ?? 0
8385
),
8486
introduction: Introduction(answer: introduction?.first?.answer ?? "", question: introduction?.first?.question ?? ""),
8587
profileSelect: profileSelect?.toDomain() ?? ProfileSelect(
@@ -109,12 +111,14 @@ public struct UserInfo: Equatable {
109111
public let userImageURL: String
110112
public let userName: String
111113
public let isActiveMatching: Bool
112-
113-
public init(userAge: Int, userImageURL: String, userName: String, isActiveMatching: Bool = false) {
114+
public let blockedContactsCount: Int
115+
116+
public init(userAge: Int, userImageURL: String, userName: String, isActiveMatching: Bool = false, blockedContactsCount: Int = 0) {
114117
self.userAge = userAge
115118
self.userImageURL = userImageURL
116119
self.userName = userName
117120
self.isActiveMatching = isActiveMatching
121+
self.blockedContactsCount = blockedContactsCount
118122
}
119123
}
120124

Projects/Feature/MyPage/Interface/Sources/MyPage/MyPageFeature.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ extension MyPageFeature {
107107
let introduction = userProfile.introduction
108108

109109
Log.debug(userProfile)
110+
state.blockedContactsCount = userInfo.blockedContactsCount
110111

111112
state.keywordItem = [
112113
ClipItem(

0 commit comments

Comments
 (0)