Fix a couple warnings
This commit is contained in:
parent
c84b042c33
commit
268aca9d7e
|
@ -29,7 +29,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||||
window!.makeKeyAndVisible()
|
window!.makeKeyAndVisible()
|
||||||
|
|
||||||
if let shortcutItem = launchOptions?[.shortcutItem] as? UIApplicationShortcutItem {
|
if let shortcutItem = launchOptions?[.shortcutItem] as? UIApplicationShortcutItem {
|
||||||
AppShortcutItem.handle(shortcutItem)
|
_ = AppShortcutItem.handle(shortcutItem)
|
||||||
}
|
}
|
||||||
|
|
||||||
return true
|
return true
|
||||||
|
|
|
@ -129,10 +129,10 @@ class ContentLabel: LinkLabel {
|
||||||
attributed.append(NSAttributedString(string: "\n\n"))
|
attributed.append(NSAttributedString(string: "\n\n"))
|
||||||
case "em", "i":
|
case "em", "i":
|
||||||
let currentFont: UIFont = attributed.attribute(.font, at: 0, effectiveRange: nil) as? UIFont ?? self.font
|
let currentFont: UIFont = attributed.attribute(.font, at: 0, effectiveRange: nil) as? UIFont ?? self.font
|
||||||
attributed.addAttribute(.font, value: currentFont.addingTraits(.traitItalic), range: attributed.fullRange)
|
attributed.addAttribute(.font, value: currentFont.addingTraits(.traitItalic)!, range: attributed.fullRange)
|
||||||
case "strong", "b":
|
case "strong", "b":
|
||||||
let currentFont: UIFont = attributed.attribute(.font, at: 0, effectiveRange: nil) as? UIFont ?? self.font
|
let currentFont: UIFont = attributed.attribute(.font, at: 0, effectiveRange: nil) as? UIFont ?? self.font
|
||||||
attributed.addAttribute(.font, value: currentFont.addingTraits(.traitBold), range: attributed.fullRange)
|
attributed.addAttribute(.font, value: currentFont.addingTraits(.traitBold)!, range: attributed.fullRange)
|
||||||
case "del":
|
case "del":
|
||||||
attributed.addAttribute(.strikethroughStyle, value: NSUnderlineStyle.single.rawValue, range: attributed.fullRange)
|
attributed.addAttribute(.strikethroughStyle, value: NSUnderlineStyle.single.rawValue, range: attributed.fullRange)
|
||||||
case "code":
|
case "code":
|
||||||
|
|
Loading…
Reference in New Issue