Fix a couple warnings

This commit is contained in:
Shadowfacts 2019-09-23 11:07:32 -04:00
parent c84b042c33
commit 268aca9d7e
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
2 changed files with 3 additions and 3 deletions

View File

@ -29,7 +29,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
window!.makeKeyAndVisible()
if let shortcutItem = launchOptions?[.shortcutItem] as? UIApplicationShortcutItem {
AppShortcutItem.handle(shortcutItem)
_ = AppShortcutItem.handle(shortcutItem)
}
return true

View File

@ -129,10 +129,10 @@ class ContentLabel: LinkLabel {
attributed.append(NSAttributedString(string: "\n\n"))
case "em", "i":
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":
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":
attributed.addAttribute(.strikethroughStyle, value: NSUnderlineStyle.single.rawValue, range: attributed.fullRange)
case "code":