From 268aca9d7eed6c1a5ebe552ac72849e247b03d32 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Mon, 23 Sep 2019 11:07:32 -0400 Subject: [PATCH] Fix a couple warnings --- Tusker/AppDelegate.swift | 2 +- Tusker/Views/ContentLabel.swift | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Tusker/AppDelegate.swift b/Tusker/AppDelegate.swift index 4a8560ba04..34432616f1 100644 --- a/Tusker/AppDelegate.swift +++ b/Tusker/AppDelegate.swift @@ -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 diff --git a/Tusker/Views/ContentLabel.swift b/Tusker/Views/ContentLabel.swift index cd72008b63..d168326f99 100644 --- a/Tusker/Views/ContentLabel.swift +++ b/Tusker/Views/ContentLabel.swift @@ -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":