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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import UIKit
enum EmotionSeed: String, CaseIterable {
case warmth = "따뜻함"
case joy = "즐거움"
case insight = "깨달음"
case sad = "슬픔"
case insight = "깨달음"

var image: UIImage {
switch self {
Expand All @@ -20,6 +20,15 @@ enum EmotionSeed: String, CaseIterable {
}
}

var circleImage: UIImage {
switch self {
case .warmth: return BKImage.Graphics.warmCircle
case .joy: return BKImage.Graphics.joyCircle
case .sad: return BKImage.Graphics.sadCircle
case .insight: return BKImage.Graphics.insightCircle
}
}

var color: UIColor {
switch self {
case .warmth: return .bkEmotionColor(.warmth)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,10 @@ final class BookDetailViewCell: UICollectionViewCell {
) {
let emotion = item.emotion ?? .joy

noteLabel.setText(text: item.note)
emotionIcon.image = emotion.image
emotionIcon.contentMode = .scaleAspectFill
emotionIcon.layer.cornerRadius = LayoutConstants.imageCornerRadius
emotionIcon.clipsToBounds = true
emotionIcon.backgroundColor = .bkBaseColor(.primary)
let displayedNote = "\"\(item.note)\""
noteLabel.setText(text: displayedNote)
emotionIcon.image = emotion.circleImage
emotionIcon.contentMode = .scaleAspectFit
emotionLabel.setText(text: "#\(emotion.rawValue)")
creationLabel.setText(text: item.createdAt.toKoreanDotDateString())
pageLabel.setText(text: "\(item.page)p")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,12 @@ extension SentenceCardViewController {

if let popoverController = activityViewController.popoverPresentationController {
popoverController.sourceView = self.view
popoverController.sourceRect = CGRect(x: self.view.bounds.midX, y: self.view.bounds.midY, width: 0, height: 0)
popoverController.sourceRect = CGRect(
x: self.view.bounds.midX,
y: self.view.bounds.midY,
width: 0,
height: 0
)
popoverController.permittedArrowDirections = []
}

Expand Down