forked from shadowfacts/Tusker
Remove old compilation condition
This commit is contained in:
parent
36a78f1a3c
commit
5a26739b78
|
@ -2632,9 +2632,6 @@
|
|||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SUPPORTS_MACCATALYST = YES;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
"SWIFT_ACTIVE_COMPILATION_CONDITIONS[sdk=iphoneos15.0]" = "SDK_IOS_15 $(inherited)";
|
||||
"SWIFT_ACTIVE_COMPILATION_CONDITIONS[sdk=iphonesimulator15.0]" = "SDK_IOS_15 $(inherited)";
|
||||
"SWIFT_ACTIVE_COMPILATION_CONDITIONS[sdk=macosx12.0]" = "SDK_IOS_15 $(inherited)";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2,6";
|
||||
};
|
||||
|
|
|
@ -245,7 +245,6 @@ extension ComposeHostingController: ComposeUIStateDelegate {
|
|||
}
|
||||
|
||||
func presentAssetPickerSheet() {
|
||||
#if SDK_IOS_15
|
||||
if #available(iOS 15.0, *) {
|
||||
let picker = AssetPickerViewController()
|
||||
picker.assetPickerDelegate = self
|
||||
|
@ -258,9 +257,6 @@ extension ComposeHostingController: ComposeUIStateDelegate {
|
|||
} else {
|
||||
presentOldAssetPickerSheet()
|
||||
}
|
||||
#else
|
||||
presentOldAssetPickerSheet()
|
||||
#endif
|
||||
}
|
||||
|
||||
private func presentOldAssetPickerSheet() {
|
||||
|
|
|
@ -326,16 +326,7 @@ class ConversationTableViewController: EnhancedTableViewController {
|
|||
}
|
||||
|
||||
@objc func toggleVisibilityButtonPressed() {
|
||||
#if SDK_IOS_15
|
||||
if #available(iOS 15.0, *) {
|
||||
visibilityBarButtonItem.isSelected = !visibilityBarButtonItem.isSelected
|
||||
showStatusesAutomatically = visibilityBarButtonItem.isSelected
|
||||
} else {
|
||||
showStatusesAutomatically = !showStatusesAutomatically
|
||||
}
|
||||
#else
|
||||
showStatusesAutomatically = !showStatusesAutomatically
|
||||
#endif
|
||||
|
||||
let snapshot = dataSource.snapshot()
|
||||
for case let .status(id: _, state: state) in snapshot.itemIdentifiers where state.collapsible == true {
|
||||
|
@ -353,12 +344,16 @@ class ConversationTableViewController: EnhancedTableViewController {
|
|||
tableView.beginUpdates()
|
||||
tableView.endUpdates()
|
||||
|
||||
if #available(iOS 15.0, *) {
|
||||
visibilityBarButtonItem.isSelected = showStatusesAutomatically
|
||||
} else {
|
||||
if showStatusesAutomatically {
|
||||
visibilityBarButtonItem.image = ConversationTableViewController.hidePostsImage
|
||||
} else {
|
||||
visibilityBarButtonItem.image = ConversationTableViewController.showPostsImage
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -247,7 +247,6 @@ extension MenuPreviewProvider {
|
|||
}
|
||||
|
||||
private func addOpenInNewWindow(actions: inout [UIAction], activity: @escaping @autoclosure () -> NSUserActivity) {
|
||||
#if SDK_IOS_15
|
||||
if #available(iOS 15.0, *) {
|
||||
let options = UIWindowScene.ActivationRequestOptions()
|
||||
options.preferredPresentationStyle = .automatic
|
||||
|
@ -259,13 +258,6 @@ extension MenuPreviewProvider {
|
|||
UIApplication.shared.requestSceneSessionActivation(nil, userActivity: activity(), options: nil, errorHandler: nil)
|
||||
}))
|
||||
}
|
||||
#else
|
||||
if UIDevice.current.userInterfaceIdiom == .pad || UIDevice.current.userInterfaceIdiom == .mac {
|
||||
actions.append(createAction(identifier: "new_window", title: "Open in New Window", systemImageName: "rectangle.badge.plus", handler: { (_) in
|
||||
UIApplication.shared.requestSceneSessionActivation(nil, userActivity: activity(), options: nil, errorHandler: nil)
|
||||
}))
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue