diff --git a/.gitignore b/.gitignore index 2d787576b..017cfd6fa 100644 --- a/.gitignore +++ b/.gitignore @@ -125,4 +125,9 @@ Localization/StringsConvertor/output .DS_Store env/**/** -!env/.env \ No newline at end of file +!env/.env + + +## Ruby ### +vendor/ +.bundle/ diff --git a/Mastodon/Scene/Transition/MediaPreview/MediaHostToMediaPreviewViewControllerAnimatedTransitioning.swift b/Mastodon/Scene/Transition/MediaPreview/MediaHostToMediaPreviewViewControllerAnimatedTransitioning.swift index 4a88236e9..ce9cfca96 100644 --- a/Mastodon/Scene/Transition/MediaPreview/MediaHostToMediaPreviewViewControllerAnimatedTransitioning.swift +++ b/Mastodon/Scene/Transition/MediaPreview/MediaHostToMediaPreviewViewControllerAnimatedTransitioning.swift @@ -253,23 +253,6 @@ extension MediaHostToMediaPreviewViewControllerAnimatedTransitioning { return rect }() let maskLayerToPath = maskLayerToRect.flatMap { UIBezierPath(rect: $0) }?.cgPath - let maskLayerToFinalRect: CGRect? = { - guard case .attachments = transitionItem.source else { return nil } - var rect = maskLayerToRect ?? transitionMaskView.frame - // clip tabBar when bar visible - guard let tabBarController = toVC.tabBarController, - !tabBarController.tabBar.isHidden, - let tabBarSuperView = tabBarController.tabBar.superview - else { return rect } - let tabBarFrameInWindow = tabBarSuperView.convert(tabBarController.tabBar.frame, to: nil) - let offset = rect.maxY - tabBarFrameInWindow.minY - guard offset > 0 else { return rect } - rect.size.height -= offset - return rect - }() - - // FIXME: - _ = maskLayerToFinalRect.flatMap { UIBezierPath(rect: $0) }?.cgPath if let maskLayerToPath = maskLayerToPath { maskLayer.path = maskLayerToPath diff --git a/MastodonSDK/Sources/MastodonExtension/UIImage.swift b/MastodonSDK/Sources/MastodonExtension/UIImage.swift index e3560af63..bb50a1428 100644 --- a/MastodonSDK/Sources/MastodonExtension/UIImage.swift +++ b/MastodonSDK/Sources/MastodonExtension/UIImage.swift @@ -48,7 +48,7 @@ extension UIImage { guard let outputImage = filter.outputImage else { return nil } var bitmap = [UInt8](repeating: 0, count: 4) - let context = CIContext(options: [.workingColorSpace: kCFNull]) + let context = CIContext(options: [.workingColorSpace: kCFNull as Any]) context.render(outputImage, toBitmap: &bitmap, rowBytes: 4, bounds: CGRect(x: 0, y: 0, width: 1, height: 1), format: .RGBA8, colorSpace: nil) return UIColor(red: CGFloat(bitmap[0]) / 255, green: CGFloat(bitmap[1]) / 255, blue: CGFloat(bitmap[2]) / 255, alpha: CGFloat(bitmap[3]) / 255) diff --git a/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/Publisher/MastodonStatusPublisher.swift b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/Publisher/MastodonStatusPublisher.swift index 93f3dd3a1..3cecbc675 100644 --- a/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/Publisher/MastodonStatusPublisher.swift +++ b/MastodonSDK/Sources/MastodonUI/Scene/ComposeContent/Publisher/MastodonStatusPublisher.swift @@ -108,11 +108,6 @@ extension MastodonStatusPublisher: StatusPublisher { // Task: attachment - let uploadContext = AttachmentViewModel.UploadContext( - apiService: api, - authContext: authContext - ) - var attachmentIDs: [Mastodon.Entity.Attachment.ID] = [] for attachmentViewModel in attachmentViewModels { // set progress @@ -161,11 +156,6 @@ extension MastodonStatusPublisher: StatusPublisher { guard pollOptions != nil else { return nil } return self.pollExpireConfigurationOption.seconds }() - let pollMultiple: Bool? = { - guard self.isPollComposing else { return nil } - guard pollOptions != nil else { return nil } - return self.pollMultipleConfigurationOption - }() let inReplyToID: Mastodon.Entity.Status.ID? = try await api.backgroundManagedObjectContext.perform { guard let replyTo = self.replyTo?.object(in: api.backgroundManagedObjectContext) else { return nil } return replyTo.id diff --git a/MastodonTests/MastodonTests.swift b/MastodonTests/MastodonTests.swift index 91d2318da..e26e6a3f1 100644 --- a/MastodonTests/MastodonTests.swift +++ b/MastodonTests/MastodonTests.swift @@ -43,7 +43,9 @@ extension MastodonTests { } receiveValue: { domain in expectation.fulfill() } - wait(for: [expectation], timeout: 10) + withExtendedLifetime(cancellable) { + wait(for: [expectation], timeout: 10) + } } func testConnectOnion() async throws { diff --git a/Podfile b/Podfile index 618b28bb3..5c8a0a47e 100644 --- a/Podfile +++ b/Podfile @@ -1,6 +1,8 @@ source 'https://cdn.cocoapods.org/' platform :ios, '15.0' +inhibit_all_warnings! + target 'Mastodon' do # Comment the next line if you don't want to use dynamic frameworks use_frameworks!