commit
29cfbea1ef
|
@ -125,4 +125,9 @@ Localization/StringsConvertor/output
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
||||||
env/**/**
|
env/**/**
|
||||||
!env/.env
|
!env/.env
|
||||||
|
|
||||||
|
|
||||||
|
## Ruby ###
|
||||||
|
vendor/
|
||||||
|
.bundle/
|
||||||
|
|
|
@ -253,23 +253,6 @@ extension MediaHostToMediaPreviewViewControllerAnimatedTransitioning {
|
||||||
return rect
|
return rect
|
||||||
}()
|
}()
|
||||||
let maskLayerToPath = maskLayerToRect.flatMap { UIBezierPath(rect: $0) }?.cgPath
|
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 {
|
if let maskLayerToPath = maskLayerToPath {
|
||||||
maskLayer.path = maskLayerToPath
|
maskLayer.path = maskLayerToPath
|
||||||
|
|
|
@ -48,7 +48,7 @@ extension UIImage {
|
||||||
guard let outputImage = filter.outputImage else { return nil }
|
guard let outputImage = filter.outputImage else { return nil }
|
||||||
|
|
||||||
var bitmap = [UInt8](repeating: 0, count: 4)
|
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)
|
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)
|
return UIColor(red: CGFloat(bitmap[0]) / 255, green: CGFloat(bitmap[1]) / 255, blue: CGFloat(bitmap[2]) / 255, alpha: CGFloat(bitmap[3]) / 255)
|
||||||
|
|
|
@ -108,11 +108,6 @@ extension MastodonStatusPublisher: StatusPublisher {
|
||||||
|
|
||||||
// Task: attachment
|
// Task: attachment
|
||||||
|
|
||||||
let uploadContext = AttachmentViewModel.UploadContext(
|
|
||||||
apiService: api,
|
|
||||||
authContext: authContext
|
|
||||||
)
|
|
||||||
|
|
||||||
var attachmentIDs: [Mastodon.Entity.Attachment.ID] = []
|
var attachmentIDs: [Mastodon.Entity.Attachment.ID] = []
|
||||||
for attachmentViewModel in attachmentViewModels {
|
for attachmentViewModel in attachmentViewModels {
|
||||||
// set progress
|
// set progress
|
||||||
|
@ -161,11 +156,6 @@ extension MastodonStatusPublisher: StatusPublisher {
|
||||||
guard pollOptions != nil else { return nil }
|
guard pollOptions != nil else { return nil }
|
||||||
return self.pollExpireConfigurationOption.seconds
|
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 {
|
let inReplyToID: Mastodon.Entity.Status.ID? = try await api.backgroundManagedObjectContext.perform {
|
||||||
guard let replyTo = self.replyTo?.object(in: api.backgroundManagedObjectContext) else { return nil }
|
guard let replyTo = self.replyTo?.object(in: api.backgroundManagedObjectContext) else { return nil }
|
||||||
return replyTo.id
|
return replyTo.id
|
||||||
|
|
|
@ -43,7 +43,9 @@ extension MastodonTests {
|
||||||
} receiveValue: { domain in
|
} receiveValue: { domain in
|
||||||
expectation.fulfill()
|
expectation.fulfill()
|
||||||
}
|
}
|
||||||
wait(for: [expectation], timeout: 10)
|
withExtendedLifetime(cancellable) {
|
||||||
|
wait(for: [expectation], timeout: 10)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func testConnectOnion() async throws {
|
func testConnectOnion() async throws {
|
||||||
|
|
2
Podfile
2
Podfile
|
@ -1,6 +1,8 @@
|
||||||
source 'https://cdn.cocoapods.org/'
|
source 'https://cdn.cocoapods.org/'
|
||||||
platform :ios, '15.0'
|
platform :ios, '15.0'
|
||||||
|
|
||||||
|
inhibit_all_warnings!
|
||||||
|
|
||||||
target 'Mastodon' do
|
target 'Mastodon' do
|
||||||
# Comment the next line if you don't want to use dynamic frameworks
|
# Comment the next line if you don't want to use dynamic frameworks
|
||||||
use_frameworks!
|
use_frameworks!
|
||||||
|
|
Loading…
Reference in New Issue