This repository was archived by the owner on Jan 4, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -94,12 +94,12 @@ import SwiftyJSON
9494private func titleAndDateAttributedString( _ title: String , dateString: String ) -> NSAttributedString {
9595 let workTitle = title. isEmpty ? " Untitled " : title
9696
97- let workFont = UIFont . serifItalicFont ( withSize: 16 ) !
98- let attributedString = NSMutableAttributedString ( string: workTitle, attributes: [ NSAttributedStringKey . font : workFont] )
97+ let workFont : UIFont ? = UIFont . serifItalicFont ( withSize: 16 )
98+ let attributedString = NSMutableAttributedString ( string: workTitle, attributes: workFont == nil ? nil : [ NSAttributedStringKey . font : workFont! ] )
9999
100100 if dateString. isNotEmpty {
101- let dateFont = UIFont . serifFont ( withSize: 16 ) !
102- let dateString = NSAttributedString ( string: " , " + dateString, attributes: [ NSAttributedStringKey . font : dateFont] )
101+ let dateFont : UIFont ? = UIFont . serifFont ( withSize: 16 )
102+ let dateString = NSAttributedString ( string: " , " + dateString, attributes: dateFont == nil ? nil : [ NSAttributedStringKey . font : dateFont! ] )
103103 attributedString. append ( dateString)
104104 }
105105
You can’t perform that action at this time.
0 commit comments