Skip to content
This repository was archived by the owner on Sep 20, 2023. It is now read-only.

Commit c2b2e97

Browse files
HuddieBasThomas
authored andcommitted
Emojis! (#2685)
1 parent fe77f98 commit c2b2e97

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Classes/Issues/Labeled/IssueLabeledModel.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,18 @@ final class IssueLabeledModel: ListDiffable {
4040
) {
4141
self.id = id
4242
self.actor = actor
43-
self.title = title
43+
self.title = title.replacingGithubEmoji
4444
self.color = color
4545
self.date = date
4646
self.type = type
47-
4847
let labelColor = color.color
4948
let actionString: String
5049
switch type {
5150
case .added: actionString = NSLocalizedString(" added ", comment: "")
5251
case .removed: actionString = NSLocalizedString(" removed ", comment: "")
5352
}
5453

54+
5555
let builder = StyledTextBuilder(styledText: StyledText(
5656
style: Styles.Text.secondary.with(foreground: Styles.Colors.Gray.medium.color)
5757
))
@@ -64,11 +64,11 @@ final class IssueLabeledModel: ListDiffable {
6464
.restore()
6565
.add(text: actionString)
6666
.save()
67-
.add(styledText: StyledText(text: title, style: Styles.Text.smallTitle.with(attributes: [
67+
.add(styledText: StyledText(text: self.title, style: Styles.Text.smallTitle.with(attributes: [
6868
.backgroundColor: labelColor,
6969
.foregroundColor: labelColor.textOverlayColor ?? .black,
7070
.baselineOffset: 1, // offset for better rounded background colors
71-
MarkdownAttribute.label: LabelDetails(owner: repoOwner, repo: repoName, label: title)
71+
MarkdownAttribute.label: LabelDetails(owner: repoOwner, repo: repoName, label: self.title)
7272
]
7373
)))
7474
.restore()

Classes/Models/RepositoryLabel.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ import IGListKit
1212
final class RepositoryLabel: ListDiffable, Hashable, Equatable, ListSwiftDiffable {
1313

1414
let color: String
15-
let name: String
15+
var name: String = ""
1616

1717
init(color: String, name: String) {
1818
self.color = color
19-
self.name = name
19+
self.name = name.replacingGithubEmoji
2020
}
2121

2222
// MARK: ListDiffable

0 commit comments

Comments
 (0)