Compare commits

..

No commits in common. "5da357ee9cc12d5f59a5f89bdb166d0f9b29f893" and "c84b042c33ec2a6b6c3ff6827b477298d1eeaaeb" have entirely different histories.

5 changed files with 11 additions and 7 deletions

View File

@ -28,7 +28,11 @@ public class Client {
lazy var decoder: JSONDecoder = {
let decoder = JSONDecoder()
decoder.dateDecodingStrategy = .iso8601
let formatter = DateFormatter()
formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SZ"
formatter.timeZone = TimeZone(abbreviation: "UTC")
formatter.locale = Locale(identifier: "en_US_POSIX")
decoder.dateDecodingStrategy = .formatted(formatter)
return decoder
}()

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

@ -67,7 +67,7 @@ extension OnboardingViewController: InstanceSelectorTableViewControllerDelegate
let url = url,
let components = URLComponents(url: url, resolvingAgainstBaseURL: true),
let item = components.queryItems?.first(where: { $0.name == "code" }),
let authCode = item.value else { return }
let authCode = item.value else { fatalError() }
MastodonController.authorize(authorizationCode: authCode) {
DispatchQueue.main.async {

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":

View File

@ -19,7 +19,7 @@
<stackView opaque="NO" contentMode="scaleToFill" alignment="top" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="H4g-D1-WTr">
<rect key="frame" x="16" y="11" width="288" height="98"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="e2C-wt-pkK">
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="e2C-wt-pkK">
<rect key="frame" x="0.0" y="0.0" width="80" height="60"/>
<constraints>
<constraint firstAttribute="height" constant="60" id="1HP-TQ-xFZ"/>
@ -40,7 +40,7 @@
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="18+" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ekk-aL-7Pq">
<rect key="frame" x="164" y="1.5" width="36" height="24"/>
<color key="backgroundColor" systemColor="systemBlueColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="backgroundColor" systemColor="systemBlueColor" red="0.0" green="0.47843137254901963" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="24" id="CNa-UL-LJh"/>
<constraint firstAttribute="width" constant="36" id="tzn-KZ-r2f"/>