From 39a109216ba86f5543fc95f768c7f37be023ff4c Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Thu, 1 Feb 2024 23:51:41 +0100 Subject: [PATCH] Style fix --- Shared/Constants.swift | 2 +- Shared/Delay.swift | 2 +- iOS/Orientation.swift | 2 +- macOS/Power.swift | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Shared/Constants.swift b/Shared/Constants.swift index ef85ff0e..e6dafbdf 100644 --- a/Shared/Constants.swift +++ b/Shared/Constants.swift @@ -2,7 +2,7 @@ import Defaults import Foundation import SwiftUI -struct Constants { +enum Constants { static let yatteeProtocol = "yattee://" static let overlayAnimation = Animation.linear(duration: 0.2) static var isIPhone: Bool { diff --git a/Shared/Delay.swift b/Shared/Delay.swift index f42663c4..e4ee92be 100644 --- a/Shared/Delay.swift +++ b/Shared/Delay.swift @@ -1,6 +1,6 @@ import Foundation -struct Delay { +enum Delay { @discardableResult static func by(_ interval: TimeInterval, block: @escaping () -> Void) -> Timer { Timer.scheduledTimer(withTimeInterval: interval, repeats: false) { _ in block() } } diff --git a/iOS/Orientation.swift b/iOS/Orientation.swift index 1f6a0a44..2b93b18e 100644 --- a/iOS/Orientation.swift +++ b/iOS/Orientation.swift @@ -3,7 +3,7 @@ import Defaults import Logging import UIKit -struct Orientation { +enum Orientation { static var logger = Logger(label: "stream.yattee.orientation") static func lockOrientation(_ orientation: UIInterfaceOrientationMask) { diff --git a/macOS/Power.swift b/macOS/Power.swift index 931f168b..b70cfbf7 100644 --- a/macOS/Power.swift +++ b/macOS/Power.swift @@ -1,6 +1,6 @@ import Foundation -struct Power { +enum Power { static var hasInternalBattery: Bool { let psInfo = IOPSCopyPowerSourcesInfo().takeRetainedValue() let psList = IOPSCopyPowerSourcesList(psInfo).takeRetainedValue() as [CFTypeRef]