mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-21 17:12:45 +02:00
Remove all @available(iOS 14... annotations
This commit is contained in:
-4
@@ -15,7 +15,6 @@
|
||||
//
|
||||
import Foundation
|
||||
|
||||
@available(iOS 14.0, *)
|
||||
@objc protocol NotificationSettingsCoordinatorBridgePresenterDelegate {
|
||||
func notificationSettingsCoordinatorBridgePresenterDelegateDidComplete(_ coordinatorBridgePresenter: NotificationSettingsCoordinatorBridgePresenter)
|
||||
}
|
||||
@@ -24,7 +23,6 @@ import Foundation
|
||||
/// This bridge is used while waiting for global usage of coordinator pattern.
|
||||
/// It breaks the Coordinator abstraction and it has been introduced for Objective-C compatibility (mainly for integration in legacy view controllers).
|
||||
/// Each bridge should be removed once the underlying Coordinator has been integrated by another Coordinator.
|
||||
@available(iOS 14.0, *)
|
||||
@objcMembers
|
||||
final class NotificationSettingsCoordinatorBridgePresenter: NSObject {
|
||||
|
||||
@@ -82,7 +80,6 @@ final class NotificationSettingsCoordinatorBridgePresenter: NSObject {
|
||||
}
|
||||
|
||||
// MARK: - NotificationSettingsCoordinatorDelegate
|
||||
@available(iOS 14.0, *)
|
||||
extension NotificationSettingsCoordinatorBridgePresenter: NotificationSettingsCoordinatorDelegate {
|
||||
func notificationSettingsCoordinatorDidComplete(_ coordinator: NotificationSettingsCoordinatorType) {
|
||||
self.delegate?.notificationSettingsCoordinatorBridgePresenterDelegateDidComplete(self)
|
||||
@@ -91,7 +88,6 @@ extension NotificationSettingsCoordinatorBridgePresenter: NotificationSettingsCo
|
||||
|
||||
// MARK: - UIAdaptivePresentationControllerDelegate
|
||||
|
||||
@available(iOS 14.0, *)
|
||||
extension NotificationSettingsCoordinatorBridgePresenter: UIAdaptivePresentationControllerDelegate {
|
||||
|
||||
func notificationSettingsCoordinatorDidComplete(_ presentationController: UIPresentationController) {
|
||||
|
||||
-2
@@ -17,7 +17,6 @@
|
||||
import Foundation
|
||||
import SwiftUI
|
||||
|
||||
@available(iOS 14.0, *)
|
||||
final class NotificationSettingsCoordinator: NotificationSettingsCoordinatorType {
|
||||
|
||||
// MARK: - Properties
|
||||
@@ -66,7 +65,6 @@ final class NotificationSettingsCoordinator: NotificationSettingsCoordinatorType
|
||||
}
|
||||
|
||||
// MARK: - NotificationSettingsViewModelCoordinatorDelegate
|
||||
@available(iOS 14.0, *)
|
||||
extension NotificationSettingsCoordinator: NotificationSettingsViewModelCoordinatorDelegate {
|
||||
func notificationSettingsViewModelDidComplete(_ viewModel: NotificationSettingsViewModelType) {
|
||||
self.delegate?.notificationSettingsCoordinatorDidComplete(self)
|
||||
|
||||
-1
@@ -17,7 +17,6 @@
|
||||
import Foundation
|
||||
import Combine
|
||||
|
||||
@available(iOS 14.0, *)
|
||||
class MXNotificationSettingsService: NotificationSettingsServiceType {
|
||||
|
||||
private let session: MXSession
|
||||
|
||||
-1
@@ -17,7 +17,6 @@
|
||||
import Foundation
|
||||
import Combine
|
||||
|
||||
@available(iOS 14.0, *)
|
||||
class MockNotificationSettingsService: NotificationSettingsServiceType, ObservableObject {
|
||||
static let example = MockNotificationSettingsService()
|
||||
|
||||
|
||||
-1
@@ -18,7 +18,6 @@ import Foundation
|
||||
import Combine
|
||||
|
||||
/// A service for changing notification settings and keywords
|
||||
@available(iOS 14.0, *)
|
||||
protocol NotificationSettingsServiceType {
|
||||
/// Publisher of all push rules.
|
||||
var rulesPublisher: AnyPublisher<[NotificationPushRuleType], Never> { get }
|
||||
|
||||
@@ -18,7 +18,6 @@ import SwiftUI
|
||||
|
||||
|
||||
/// A single rounded rect chip to be rendered within `Chips` collection
|
||||
@available(iOS 14.0, *)
|
||||
struct Chip: View {
|
||||
|
||||
@Environment(\.isEnabled) var isEnabled
|
||||
@@ -62,7 +61,6 @@ struct Chip: View {
|
||||
}
|
||||
}
|
||||
|
||||
@available(iOS 14.0, *)
|
||||
struct Chip_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
Group {
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
import SwiftUI
|
||||
|
||||
/// Renders multiple chips in a flow layout.
|
||||
@available(iOS 14.0, *)
|
||||
struct Chips: View {
|
||||
|
||||
@State private var frame: CGRect = CGRect.zero
|
||||
@@ -75,7 +74,6 @@ struct Chips: View {
|
||||
}
|
||||
}
|
||||
|
||||
@available(iOS 14.0, *)
|
||||
struct Chips_Previews: PreviewProvider {
|
||||
static var chips: [String] = ["Chip1", "Chip2", "Chip3", "Chip4", "Chip5", "Chip6"]
|
||||
static var previews: some View {
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
import SwiftUI
|
||||
|
||||
/// Renders an input field and a collection of chips.
|
||||
@available(iOS 14.0, *)
|
||||
struct ChipsInput: View {
|
||||
|
||||
@Environment(\.theme) var theme: ThemeSwiftUI
|
||||
@@ -47,7 +46,6 @@ struct ChipsInput: View {
|
||||
}
|
||||
}
|
||||
|
||||
@available(iOS 14.0, *)
|
||||
struct ChipsInput_Previews: PreviewProvider {
|
||||
static var chips = Set<String>(["Website", "Element", "Design", "Matrix/Element"])
|
||||
static var previews: some View {
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
import SwiftUI
|
||||
|
||||
@available(iOS 14.0, *)
|
||||
struct DefaultNotificationSettings: View {
|
||||
|
||||
@ObservedObject var viewModel: NotificationSettingsViewModel
|
||||
@@ -28,7 +27,6 @@ struct DefaultNotificationSettings: View {
|
||||
}
|
||||
}
|
||||
|
||||
@available(iOS 14.0, *)
|
||||
struct DefaultNotifications_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
NavigationView {
|
||||
|
||||
@@ -18,7 +18,6 @@ import Foundation
|
||||
import SwiftUI
|
||||
|
||||
/// An input field style for forms.
|
||||
@available(iOS 14.0, *)
|
||||
struct FormInputFieldStyle: TextFieldStyle {
|
||||
|
||||
@Environment(\.theme) var theme: ThemeSwiftUI
|
||||
@@ -49,7 +48,6 @@ struct FormInputFieldStyle: TextFieldStyle {
|
||||
}
|
||||
|
||||
|
||||
@available(iOS 14.0, *)
|
||||
struct FormInputFieldStyle_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
Group {
|
||||
|
||||
-2
@@ -16,7 +16,6 @@
|
||||
|
||||
import SwiftUI
|
||||
|
||||
@available(iOS 14.0, *)
|
||||
struct MentionsAndKeywordNotificationSettings: View {
|
||||
|
||||
@ObservedObject var viewModel: NotificationSettingsViewModel
|
||||
@@ -39,7 +38,6 @@ struct MentionsAndKeywordNotificationSettings: View {
|
||||
}
|
||||
}
|
||||
|
||||
@available(iOS 14.0, *)
|
||||
struct MentionsAndKeywords_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
NavigationView {
|
||||
|
||||
@@ -20,7 +20,6 @@ import SwiftUI
|
||||
///
|
||||
/// Also renders an optional bottom section.
|
||||
/// Used in the case of keywords, for the keyword chips and input.
|
||||
@available(iOS 14.0, *)
|
||||
struct NotificationSettings<BottomSection: View>: View {
|
||||
|
||||
@ObservedObject var viewModel: NotificationSettingsViewModel
|
||||
@@ -45,14 +44,12 @@ struct NotificationSettings<BottomSection: View>: View {
|
||||
}
|
||||
}
|
||||
|
||||
@available(iOS 14.0, *)
|
||||
extension NotificationSettings where BottomSection == EmptyView {
|
||||
init(viewModel: NotificationSettingsViewModel) {
|
||||
self.init(viewModel: viewModel, bottomSection: nil)
|
||||
}
|
||||
}
|
||||
|
||||
@available(iOS 14.0, *)
|
||||
struct NotificationSettings_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
Group {
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
import SwiftUI
|
||||
|
||||
/// Renders the keywords input, driven by 'NotificationSettingsViewModel'.
|
||||
@available(iOS 14.0, *)
|
||||
struct NotificationSettingsKeywords: View {
|
||||
@ObservedObject var viewModel: NotificationSettingsViewModel
|
||||
var body: some View {
|
||||
@@ -32,7 +31,6 @@ struct NotificationSettingsKeywords: View {
|
||||
}
|
||||
}
|
||||
|
||||
@available(iOS 14.0, *)
|
||||
struct Keywords_Previews: PreviewProvider {
|
||||
static let viewModel = NotificationSettingsViewModel(
|
||||
notificationSettingsService: MockNotificationSettingsService.example,
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
import SwiftUI
|
||||
|
||||
@available(iOS 14.0, *)
|
||||
struct OtherNotificationSettings: View {
|
||||
@ObservedObject var viewModel: NotificationSettingsViewModel
|
||||
|
||||
@@ -27,7 +26,6 @@ struct OtherNotificationSettings: View {
|
||||
}
|
||||
}
|
||||
|
||||
@available(iOS 14.0, *)
|
||||
struct OtherNotifications_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
NavigationView {
|
||||
|
||||
-1
@@ -20,7 +20,6 @@ import Foundation
|
||||
import Combine
|
||||
import SwiftUI
|
||||
|
||||
@available(iOS 14.0, *)
|
||||
final class NotificationSettingsViewModel: NotificationSettingsViewModelType, ObservableObject {
|
||||
|
||||
// MARK: - Properties
|
||||
|
||||
Reference in New Issue
Block a user