Skip to content

Commit

Permalink
[Feat] #189 - 노티에 인기글 카테고리 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
boogios committed Jun 16, 2024
1 parent 36f9cf6 commit d02ac18
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
1 change: 1 addition & 0 deletions DontBe-iOS/DontBe-iOS/Global/Literals/StringLiterals.swift
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ enum StringLiterals {
static let commentTransparency = "님, 작성하신 답글로 인해 점점 투명해지고 있어요."
static let emptyTitle = "아직 받은 알림이 없어요."
static let emptyDescription = "새로운 소식이 도착하면 알려드릴게요."
static let popularWriter = "님이 작성하신 글이 인기글로 선정되었어요. 🥳🥳"
}

enum MyPage {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ final class NotificationTableViewCell: UITableViewCell, UITableViewCellRegistera
return profileImage
}()

let notificationLabel: UILabel = {
var notificationLabel: UILabel = {
let notificationLabel = UILabel()
notificationLabel.textColor = .donGray12
notificationLabel.font = .font(.body4)
Expand Down Expand Up @@ -148,6 +148,16 @@ extension NotificationTableViewCell {
text: notificationLabel.text,
targetString: list.memberNickname,
font: .font(.body3))
case .popularWriter:
nicknameLabel.text = list.memberNickname
notificationLabel.text = list.memberNickname + " " + list.notificationType.description
notificationLabel.setTextWithLineHeightAndFont(
text: notificationLabel.text,
targetString: list.memberNickname,
font: .font(.body3))
case .popularContent:
nicknameLabel.text = "어제 가장 인기있었던 글이에요.\n"
notificationLabel.text = ""
}

minutes.text = list.time.formattedTime()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ enum NotificaitonType: String {
case contentGhost = "contentGhost"
case commentGhost = "commentGhost"
case userBan = "userBan"
case popularWriter = "popularWriter"
case popularContent = "popularContent"

var description: String {
switch self {
Expand All @@ -36,6 +38,10 @@ enum NotificaitonType: String {
return StringLiterals.Notification.commentTransparency
case .userBan:
return StringLiterals.Notification.violation
case .popularWriter:
return StringLiterals.Notification.popularWriter
case .popularContent:
return StringLiterals.Notification.violation
}
}
}

0 comments on commit d02ac18

Please sign in to comment.