Skip to content

Commit ac6c006

Browse files
authored
[Merge] pull request #312 from Team-Wable/fix/#311-content-comment-configure
[Fix] 게시글, 댓글 셀 뷰 Configure 되지 않는 문제 해결
2 parents 541b2bd + 4f29cc1 commit ac6c006

File tree

9 files changed

+26
-17
lines changed

9 files changed

+26
-17
lines changed

Wable-iOS.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3444,7 +3444,7 @@
34443444
CODE_SIGN_IDENTITY = "Apple Development";
34453445
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
34463446
CODE_SIGN_STYLE = Manual;
3447-
CURRENT_PROJECT_VERSION = 3;
3447+
CURRENT_PROJECT_VERSION = 1;
34483448
DEVELOPMENT_TEAM = "";
34493449
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = HGVD26K7DP;
34503450
GENERATE_INFOPLIST_FILE = YES;
@@ -3462,7 +3462,7 @@
34623462
"$(inherited)",
34633463
"@executable_path/Frameworks",
34643464
);
3465-
MARKETING_VERSION = 1.6.0;
3465+
MARKETING_VERSION = 1.6.1;
34663466
PRODUCT_BUNDLE_IDENTIFIER = "com.wable.Wable-iOS";
34673467
PRODUCT_NAME = "$(TARGET_NAME)";
34683468
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -3487,7 +3487,7 @@
34873487
CODE_SIGN_IDENTITY = "Apple Development";
34883488
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
34893489
CODE_SIGN_STYLE = Manual;
3490-
CURRENT_PROJECT_VERSION = 3;
3490+
CURRENT_PROJECT_VERSION = 1;
34913491
DEVELOPMENT_TEAM = "";
34923492
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = HGVD26K7DP;
34933493
GENERATE_INFOPLIST_FILE = YES;
@@ -3505,7 +3505,7 @@
35053505
"$(inherited)",
35063506
"@executable_path/Frameworks",
35073507
);
3508-
MARKETING_VERSION = 1.6.0;
3508+
MARKETING_VERSION = 1.6.1;
35093509
PRODUCT_BUNDLE_IDENTIFIER = "com.wable.Wable-iOS";
35103510
PRODUCT_NAME = "$(TARGET_NAME)";
35113511
PROVISIONING_PROFILE_SPECIFIER = "";

Wable-iOS/Data/Mapper/CommentMapper.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ extension CommentMapper {
1414
let dateFormatter = DateFormatter()
1515
dateFormatter.dateFormat = "yyyy-MM-dd HH:mm:ss"
1616
dateFormatter.timeZone = TimeZone(abbreviation: "KST")
17+
dateFormatter.locale = Locale(identifier: "en_US_POSIX")
1718

1819
return response.map { comment in
1920
let url = URL(string: comment.memberProfileURL)
@@ -54,6 +55,7 @@ extension CommentMapper {
5455
static func toDomain(_ contentID: Int, _ response: [DTO.Response.FetchContentComments]) -> [Comment] {
5556
let dateFormatter = DateFormatter()
5657
dateFormatter.dateFormat = "yyyy-MM-dd HH:mm:ss"
58+
dateFormatter.locale = Locale(identifier: "en_US_POSIX")
5759

5860
return response.map { comment in
5961
let url = URL(string: comment.memberProfileURL)

Wable-iOS/Data/Mapper/ContentMapper.swift

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ enum ContentMapper { }
1212
extension ContentMapper {
1313
static func toDomain(_ response: DTO.Response.FetchContent, _ id: Int) -> Content {
1414
let dateFormatter = DateFormatter()
15-
dateFormatter.dateFormat = "yyyy-MM-dd HH:mm:SS"
15+
dateFormatter.dateFormat = "yyyy-MM-dd HH:mm:ss"
1616
dateFormatter.timeZone = TimeZone(abbreviation: "KST")
17+
dateFormatter.locale = Locale(identifier: "en_US_POSIX")
1718

1819
let memberProfileURL = URL(string: response.memberProfileURL)
1920
let contentImageURL = URL(string: response.contentImageURL ?? "")
@@ -52,8 +53,9 @@ extension ContentMapper {
5253

5354
static func toDomain(_ response: [DTO.Response.FetchContents]) -> [Content] {
5455
let dateFormatter = DateFormatter()
55-
dateFormatter.dateFormat = "yyyy-MM-dd HH:mm:SS"
56+
dateFormatter.dateFormat = "yyyy-MM-dd HH:mm:ss"
5657
dateFormatter.timeZone = TimeZone(abbreviation: "KST")
58+
dateFormatter.locale = Locale(identifier: "en_US_POSIX")
5759

5860
return response.map { content in
5961
let memberProfileURL = URL(string: content.memberProfileURL)
@@ -94,8 +96,9 @@ extension ContentMapper {
9496

9597
static func toDomain(_ response: [DTO.Response.FetchUserContents]) -> [Content] {
9698
let dateFormatter = DateFormatter()
97-
dateFormatter.dateFormat = "yyyy-MM-dd HH:mm:SS"
99+
dateFormatter.dateFormat = "yyyy-MM-dd HH:mm:ss"
98100
dateFormatter.timeZone = TimeZone(abbreviation: "KST")
101+
dateFormatter.locale = Locale(identifier: "en_US_POSIX")
99102

100103
return response.map { content in
101104
let memberProfileURL = URL(string: content.memberProfileURL)

Wable-iOS/Data/Mapper/InformationMapper.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ enum InformationMapper {
5252
let dateFormatter = DateFormatter()
5353
dateFormatter.dateFormat = "yyyy-MM-dd HH:mm:ss"
5454
dateFormatter.timeZone = TimeZone(abbreviation: "KST")
55+
dateFormatter.locale = Locale(identifier: "en_US_POSIX")
5556

5657
return dtos.compactMap { dto in
5758
Announcement(
@@ -84,6 +85,7 @@ enum InformationMapper {
8485
let dateFormatter = DateFormatter()
8586
dateFormatter.dateFormat = "yyyy-MM-dd HH:mm:ss"
8687
dateFormatter.timeZone = TimeZone(abbreviation: "KST")
88+
dateFormatter.locale = Locale(identifier: "en_US_POSIX")
8789

8890
return dtos.compactMap { dto in
8991
guard let url = URL(string: dto.urlString),

Wable-iOS/Data/Mapper/NotificationMapper.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ enum NotificationMapper {
1212
let dateFormatter = DateFormatter()
1313
dateFormatter.dateFormat = "yyyy-MM-dd HH:mm:ss"
1414
dateFormatter.timeZone = TimeZone(abbreviation: "KST")
15+
dateFormatter.locale = Locale(identifier: "en_US_POSIX")
1516

1617
return dtos.compactMap { dto in
1718
InformationNotification(
@@ -27,6 +28,7 @@ enum NotificationMapper {
2728
let dateFormatter = DateFormatter()
2829
dateFormatter.dateFormat = "yyyy-MM-dd HH:mm:ss"
2930
dateFormatter.timeZone = TimeZone(abbreviation: "KST")
31+
dateFormatter.locale = Locale(identifier: "en_US_POSIX")
3032

3133
return dtos.compactMap { dto in
3234
ActivityNotification(

Wable-iOS/Presentation/WableComponent/Cell/CommentCollectionViewCell.swift

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -242,19 +242,17 @@ extension CommentCollectionViewCell {
242242
configurePostStatus(info: info)
243243

244244
contentTextView.text = info.text
245+
replyButton.configureButton()
246+
likeButton.configureButton(isLiked: info.isLiked, likeCount: info.likeCount, postType: .comment)
245247

246-
guard let createdDate = info.createdDate else { return }
247248
infoView.configureView(
248249
userProfileURL: info.author.profileURL,
249250
userName: info.author.nickname,
250251
userFanTeam: info.author.fanTeam,
251252
opacity: info.opacity.value,
252-
createdDate: createdDate,
253+
createdDate: info.createdDate,
253254
postType: .comment
254255
)
255-
256-
replyButton.configureButton()
257-
likeButton.configureButton(isLiked: info.isLiked, likeCount: info.likeCount, postType: .comment)
258256
}
259257

260258
func configureCommentType(info: Comment, commentType: CommentType) {

Wable-iOS/Presentation/WableComponent/Cell/ContentCollectionViewCell.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -271,14 +271,12 @@ extension ContentCollectionViewCell {
271271
self.profileImageViewTapHandler = profileImageViewTapHandler
272272
self.settingButtonTapHandler = settingButtonTapHandler
273273

274-
guard let createdDate = info.createdDate else { return }
275-
276274
infoView.configureView(
277275
userProfileURL: info.author.profileURL,
278276
userName: info.author.nickname,
279277
userFanTeam: info.author.fanTeam,
280278
opacity: info.opacity.value,
281-
createdDate: createdDate,
279+
createdDate: info.createdDate,
282280
postType: .content
283281
)
284282

Wable-iOS/Presentation/WableComponent/View/PostUserInfoView.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,9 @@ private extension PostUserInfoView {
138138
/// 게시물 작성 시간을 상대적인 시간 문자열로 변환
139139
/// - Parameter date: 게시물 작성 날짜
140140
/// - Returns: "지금", "n분 전", "n시간 전" 등의 형식으로 변환된 문자열
141-
func configurePostTime(date: Date) -> String {
141+
func configurePostTime(date: Date?) -> String {
142+
guard let date = date else { return "" }
143+
142144
let now = Date()
143145
let timeInterval = now.timeIntervalSince(date)
144146
let seconds = Int(timeInterval)
@@ -187,7 +189,7 @@ extension PostUserInfoView {
187189
userName: String,
188190
userFanTeam: LCKTeam?,
189191
opacity: Int,
190-
createdDate: Date,
192+
createdDate: Date?,
191193
postType: PostType
192194
) {
193195
switch postType {

Wable-iOS/Resource/Info.plist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5+
<key>UIDesignRequiresCompatibility</key>
6+
<true/>
57
<key>AMPLITUDE_APP_KEY</key>
68
<string>$(AMPLITUDE_APP_KEY)</string>
79
<key>BASE_URL</key>

0 commit comments

Comments
 (0)