Skip to content

Commit ec0bef1

Browse files
committed
Removed NukeMe struct
1 parent e9b32d4 commit ec0bef1

File tree

1 file changed

+12
-28
lines changed

1 file changed

+12
-28
lines changed

WooCommerce/Classes/Tools/StringFormatter/StringStyles.swift

Lines changed: 12 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ extension StringStyles {
6464
let bold: Style = [.paragraphStyle: NSParagraphStyle.subheadline, .font: UIFont.subheadline.bold]
6565
let blockquote: Style = [.paragraphStyle: NSParagraphStyle.subheadline, .font: UIFont.subheadline.italics]
6666
let italics: Style = [.paragraphStyle: NSParagraphStyle.subheadline, .font: UIFont.subheadline.italics]
67-
let noticon: Style = [.paragraphStyle: NSParagraphStyle.subheadline, .font: UIFont.noticon(forStyle: .subheadline), .foregroundColor: NukeMe.subjectNoticonColor]
67+
let noticon: Style = [.paragraphStyle: NSParagraphStyle.subheadline, .font: UIFont.noticon(forStyle: .subheadline), .foregroundColor: StyleManager.defaultTextColor]
6868

6969
return StringStyles(regular: regular, bold: bold, blockquote: blockquote, italics: italics, match: nil, noticon: noticon)
7070
}()
@@ -82,9 +82,9 @@ extension StringStyles {
8282
/// Styles: Notification Defailts / Header Block
8383
///
8484
static let header: StringStyles = {
85-
let regular: Style = [.font: UIFont.body, .foregroundColor: NukeMe.bodyTextColor]
86-
let bold: Style = [.font: UIFont.body.bold, .foregroundColor: NukeMe.bodyTextColor]
87-
let italics: Style = [.font: UIFont.body.italics, .foregroundColor: NukeMe.headerItalicsColor]
85+
let regular: Style = [.font: UIFont.body, .foregroundColor: StyleManager.defaultTextColor]
86+
let bold: Style = [.font: UIFont.body.bold, .foregroundColor: StyleManager.defaultTextColor]
87+
let italics: Style = [.font: UIFont.body.italics, .foregroundColor: StyleManager.defaultTextColor]
8888

8989
return StringStyles(regular: regular, bold: bold, italics: italics)
9090
}()
@@ -93,7 +93,7 @@ extension StringStyles {
9393
/// Styles: Notification Defailts / Footer Block
9494
///
9595
static let footer: StringStyles = {
96-
let regular: Style = [.paragraphStyle: NSParagraphStyle.body, .font: UIFont.body, .foregroundColor: NukeMe.footerTextColor]
96+
let regular: Style = [.paragraphStyle: NSParagraphStyle.body, .font: UIFont.body, .foregroundColor: StyleManager.defaultTextColor]
9797

9898
return StringStyles(regular: regular, noticon: body.noticon)
9999
}()
@@ -102,30 +102,14 @@ extension StringStyles {
102102
/// Styles: Notification Defailts / Body Blocks
103103
///
104104
static let body: StringStyles = {
105-
let regular: Style = [.paragraphStyle: NSParagraphStyle.body, .font: UIFont.body, .foregroundColor: NukeMe.bodyTextColor]
106-
let bold: Style = [.paragraphStyle: NSParagraphStyle.body, .font: UIFont.body.bold, .foregroundColor: NukeMe.bodyTextColor]
107-
let blockquote: Style = [.paragraphStyle: NSParagraphStyle.body, .font: UIFont.body.italics, .foregroundColor: NukeMe.bodyBlockquotedColor]
108-
let match: Style = [.paragraphStyle: NSParagraphStyle.body, .font: UIFont.body.bold, .foregroundColor: NukeMe.bodyLinkColor]
109-
let noticon: Style = [.paragraphStyle: NSParagraphStyle.body, .font: UIFont.noticon(forStyle: .body), .foregroundColor: NukeMe.bodyNoticonColor]
110-
let italic: Style = [.paragraphStyle: NSParagraphStyle.body, .font: UIFont.body.italics, .foregroundColor: NukeMe.bodyTextColor]
111-
let link: Style = [.foregroundColor: NukeMe.bodyLinkColor]
105+
let regular: Style = [.paragraphStyle: NSParagraphStyle.body, .font: UIFont.body, .foregroundColor: StyleManager.defaultTextColor]
106+
let bold: Style = [.paragraphStyle: NSParagraphStyle.body, .font: UIFont.body.bold, .foregroundColor: StyleManager.defaultTextColor]
107+
let blockquote: Style = [.paragraphStyle: NSParagraphStyle.body, .font: UIFont.body.italics, .foregroundColor: StyleManager.defaultTextColor]
108+
let match: Style = [.paragraphStyle: NSParagraphStyle.body, .font: UIFont.body.bold, .foregroundColor: StyleManager.defaultTextColor]
109+
let noticon: Style = [.paragraphStyle: NSParagraphStyle.body, .font: UIFont.noticon(forStyle: .body), .foregroundColor: StyleManager.defaultTextColor]
110+
let italic: Style = [.paragraphStyle: NSParagraphStyle.body, .font: UIFont.body.italics, .foregroundColor: StyleManager.defaultTextColor]
111+
let link: Style = [.foregroundColor: StyleManager.defaultTextColor]
112112

113113
return StringStyles(regular: regular, bold: bold, blockquote: blockquote, match: match, noticon: noticon, link: link)
114114
}()
115115
}
116-
117-
118-
// MARK: - TODO: Nuke this. Map the Colors, as required, from the StyleManager
119-
//
120-
private struct NukeMe {
121-
static let subjectNoticonColor = UIColor.black
122-
123-
static let headerItalicsColor = UIColor.gray
124-
125-
static let bodyTextColor = UIColor.black
126-
static let bodyBlockquotedColor = UIColor.black
127-
static let bodyLinkColor = UIColor.black
128-
static let bodyNoticonColor = UIColor.black
129-
130-
static let footerTextColor = UIColor.black
131-
}

0 commit comments

Comments
 (0)