Remove all @available(iOS 14... annotations

This commit is contained in:
Johannes Marbach
2022-06-23 09:06:20 +02:00
parent 6d195c103d
commit 868fd7e0c8
271 changed files with 0 additions and 413 deletions
@@ -17,7 +17,6 @@
import Foundation
import DesignKit
@available(iOS 14.0, *)
extension ThemeIdentifier {
fileprivate static let defaultTheme = DefaultThemeSwiftUI()
fileprivate static let darkTheme = DarkThemeSwiftUI()
@@ -18,12 +18,10 @@ import Foundation
import SwiftUI
import DesignKit
@available(iOS 14.0, *)
private struct ThemeKey: EnvironmentKey {
static let defaultValue = ThemePublisher.shared.theme
}
@available(iOS 14.0, *)
extension EnvironmentValues {
var theme: ThemeSwiftUI {
get { self[ThemeKey.self] }
@@ -31,7 +29,6 @@ extension EnvironmentValues {
}
}
@available(iOS 14.0, *)
extension View {
/// A theme modifier for setting the theme for this view and all its descendants in the hierarchy.
/// - Parameter theme: A theme to be set as the environment value.
@@ -41,7 +38,6 @@ extension View {
}
}
@available(iOS 14.0, *)
extension View {
/// A theme modifier for setting the theme by id for this view and all its descendants in the hierarchy.
/// - Parameter themeId: ThemeIdentifier of a theme to be set as the environment value.
@@ -21,7 +21,6 @@ import Combine
///
/// Replaces the old ThemeObserver. Riot app can push updates to this class
/// removing the dependency of this class on the `ThemeService`.
@available(iOS 14.0, *)
class ThemePublisher: ObservableObject {
private static var _shared: ThemePublisher? = nil
@@ -17,7 +17,6 @@
import Foundation
import DesignKit
@available(iOS 14.0, *)
protocol ThemeSwiftUI: ThemeSwiftUIType {
var identifier: ThemeIdentifier { get }
var isDark: Bool { get }
@@ -17,7 +17,6 @@
import Foundation
import SwiftUI
@available(iOS 14.0, *)
extension ThemeSwiftUI {
/// Get the stable display user color based on userId.
@@ -17,7 +17,6 @@
import Foundation
import DesignKit
@available(iOS 14.0, *)
struct DarkThemeSwiftUI: ThemeSwiftUI {
var identifier: ThemeIdentifier = .dark
let isDark: Bool = true
@@ -17,7 +17,6 @@
import Foundation
import DesignKit
@available(iOS 14.0, *)
struct DefaultThemeSwiftUI: ThemeSwiftUI {
var identifier: ThemeIdentifier = .light
let isDark: Bool = false