mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-24 18:42:47 +02:00
Remove all @available(iOS 14... annotations
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user