Fix compiling for Catalyst and visionOS
This commit is contained in:
parent
fc458fc5f3
commit
2e3891c468
@ -210,11 +210,15 @@ private class WrappedCollectionViewController: UIViewController {
|
||||
return section
|
||||
}
|
||||
let attachmentCell = UICollectionView.CellRegistration<HostingCollectionViewCell, DraftAttachment> { [unowned self] cell, indexPath, attachment in
|
||||
#if !os(visionOS)
|
||||
cell.containingViewController = self
|
||||
#endif
|
||||
cell.setView(AttachmentCollectionViewCellView(attachment: attachment))
|
||||
}
|
||||
let addButtonCell = UICollectionView.CellRegistration<HostingCollectionViewCell, Void> { [unowned self] cell, indexPath, item in
|
||||
#if !os(visionOS)
|
||||
cell.containingViewController = self
|
||||
#endif
|
||||
cell.setView(AddAttachmentButton(viewController: self))
|
||||
}
|
||||
let collectionView = IntrinsicContentSizeCollectionView(frame: .zero, collectionViewLayout: layout)
|
||||
|
@ -27,7 +27,7 @@ struct ComposeNavigationBarActions: ToolbarContent {
|
||||
DraftsButton(isShowingDrafts: $isShowingDrafts)
|
||||
}
|
||||
ToolbarItem(placement: .confirmationAction) {
|
||||
PostButton(draft: draft, isPosting: isPosting)
|
||||
PostButton(draft: draft, isPosting: isPosting, postStatus: postStatus)
|
||||
}
|
||||
#else
|
||||
ToolbarItem(placement: .confirmationAction) {
|
||||
|
@ -137,7 +137,9 @@ private struct ComposeViewBody: View {
|
||||
ScrollView {
|
||||
scrollContent
|
||||
}
|
||||
#if !os(visionOS)
|
||||
.scrollDismissesKeyboardInteractivelyIfAvailable()
|
||||
#endif
|
||||
#if !os(visionOS) && !targetEnvironment(macCatalyst)
|
||||
.modifier(ToolbarSafeAreaInsetModifier())
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user