mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-12-01 12:41:00 +00:00
Fix more warnings
This commit is contained in:
parent
7321b26f00
commit
1977a4d65f
16 changed files with 21 additions and 23 deletions
|
@ -228,7 +228,7 @@ struct ActivityView: UIViewControllerRepresentable {
|
|||
func updateUIViewController(_: UIActivityViewController, context _: UIViewControllerRepresentableContext<ActivityView>) {}
|
||||
}
|
||||
|
||||
extension URL: Identifiable {
|
||||
extension URL: @retroactive Identifiable {
|
||||
public var id: String {
|
||||
absoluteString
|
||||
}
|
||||
|
|
|
@ -5,9 +5,6 @@ import Foundation
|
|||
import Models
|
||||
import Network
|
||||
|
||||
extension IntentDescription: @unchecked Sendable {}
|
||||
extension TypeDisplayRepresentation: @unchecked Sendable {}
|
||||
|
||||
public struct AppAccountEntity: Identifiable, AppEntity {
|
||||
public var id: String { account.id }
|
||||
|
||||
|
|
|
@ -32,8 +32,8 @@ struct AppShortcuts: AppShortcutsProvider {
|
|||
AppShortcut(
|
||||
intent: PostImageIntent(),
|
||||
phrases: [
|
||||
"Post images \(\.$images) in \(.applicationName)",
|
||||
"Send photos \(\.$images) with \(.applicationName)",
|
||||
"Post images images in \(.applicationName)",
|
||||
"Send photos with \(.applicationName)",
|
||||
],
|
||||
shortTitle: "Post a status with an image",
|
||||
systemImageName: "photo"
|
||||
|
|
|
@ -2,7 +2,7 @@ import AppIntents
|
|||
import WidgetKit
|
||||
|
||||
struct AccountWidgetConfiguration: WidgetConfigurationIntent {
|
||||
static let title: LocalizedStringResource = "Configuration"
|
||||
static let title: LocalizedStringResource = "Account Widget Configuration"
|
||||
static let description = IntentDescription("Choose the account for this widget")
|
||||
|
||||
@Parameter(title: "Account")
|
||||
|
|
|
@ -2,7 +2,7 @@ import AppIntents
|
|||
import WidgetKit
|
||||
|
||||
struct HashtagPostsWidgetConfiguration: WidgetConfigurationIntent {
|
||||
static let title: LocalizedStringResource = "Configuration"
|
||||
static let title: LocalizedStringResource = "Widget Configuration"
|
||||
static let description = IntentDescription("Choose the account and hashtag for this widget")
|
||||
|
||||
@Parameter(title: "Account")
|
||||
|
|
|
@ -2,7 +2,7 @@ import AppIntents
|
|||
import WidgetKit
|
||||
|
||||
struct ListsWidgetConfiguration: WidgetConfigurationIntent {
|
||||
static let title: LocalizedStringResource = "Configuration"
|
||||
static let title: LocalizedStringResource = "List Widget Configuration"
|
||||
static let description = IntentDescription("Choose the account and list for this widget")
|
||||
|
||||
@Parameter(title: "Account")
|
||||
|
|
|
@ -2,7 +2,7 @@ import AppIntents
|
|||
import WidgetKit
|
||||
|
||||
struct MentionsWidgetConfiguration: WidgetConfigurationIntent {
|
||||
static let title: LocalizedStringResource = "Configuration"
|
||||
static let title: LocalizedStringResource = "Mentions Widget Configuration"
|
||||
static let description = IntentDescription("Choose the account for this widget")
|
||||
|
||||
@Parameter(title: "Account")
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import AppAccount
|
||||
import CryptoKit
|
||||
import Env
|
||||
@preconcurrency import Intents
|
||||
import Intents
|
||||
import KeychainSwift
|
||||
import Models
|
||||
import Network
|
||||
|
|
|
@ -9,7 +9,7 @@ public let availableColorsSets: [ColorSetCouple] =
|
|||
.init(light: ConstellationLight(), dark: ConstellationDark()),
|
||||
.init(light: ThreadsLight(), dark: ThreadsDark())]
|
||||
|
||||
public protocol ColorSet {
|
||||
public protocol ColorSet: Sendable {
|
||||
var name: ColorSetName { get }
|
||||
var scheme: ColorScheme { get }
|
||||
var tintColor: Color { get set }
|
||||
|
@ -18,11 +18,11 @@ public protocol ColorSet {
|
|||
var labelColor: Color { get set }
|
||||
}
|
||||
|
||||
public enum ColorScheme: String {
|
||||
public enum ColorScheme: String, Sendable {
|
||||
case dark, light
|
||||
}
|
||||
|
||||
public enum ColorSetName: String {
|
||||
public enum ColorSetName: String, Sendable {
|
||||
case iceCubeDark = "Ice Cube - Dark"
|
||||
case iceCubeLight = "Ice Cube - Light"
|
||||
case iceCubeNeonDark = "Ice Cube Neon - Dark"
|
||||
|
@ -39,7 +39,7 @@ public enum ColorSetName: String {
|
|||
case threadsDark = "Threads - Dark"
|
||||
}
|
||||
|
||||
public struct ColorSetCouple: Identifiable {
|
||||
public struct ColorSetCouple: Identifiable, Sendable {
|
||||
public var id: String {
|
||||
dark.name.rawValue + light.name.rawValue
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ public extension Color {
|
|||
}
|
||||
}
|
||||
|
||||
extension Color: RawRepresentable {
|
||||
extension Color: @retroactive RawRepresentable {
|
||||
public init?(rawValue: Int) {
|
||||
let red = Double((rawValue & 0xFF0000) >> 16) / 0xFF
|
||||
let green = Double((rawValue & 0x00FF00) >> 8) / 0xFF
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import Foundation
|
||||
|
||||
extension Array: RawRepresentable where Element: Codable {
|
||||
extension Array: @retroactive RawRepresentable where Element: Codable {
|
||||
public init?(rawValue: String) {
|
||||
guard let data = rawValue.data(using: .utf8),
|
||||
let result = try? JSONDecoder().decode([Element].self, from: data)
|
||||
|
|
|
@ -8,8 +8,8 @@ import Observation
|
|||
import SwiftUI
|
||||
import UserNotifications
|
||||
|
||||
extension UNNotificationResponse: @unchecked Sendable {}
|
||||
extension UNUserNotificationCenter: @unchecked Sendable {}
|
||||
extension UNNotificationResponse: @unchecked @retroactive Sendable {}
|
||||
extension UNUserNotificationCenter: @unchecked @retroactive Sendable {}
|
||||
|
||||
public struct PushAccount: Equatable {
|
||||
public let server: String
|
||||
|
|
|
@ -536,7 +536,7 @@ import SwiftUI
|
|||
}
|
||||
}
|
||||
|
||||
extension UInt: RawRepresentable {
|
||||
extension UInt: @retroactive RawRepresentable {
|
||||
public var rawValue: Int {
|
||||
Int(self)
|
||||
}
|
||||
|
|
|
@ -982,4 +982,4 @@ extension StatusEditor.ViewModel: UITextPasteDelegate {
|
|||
}
|
||||
}
|
||||
|
||||
extension PhotosPickerItem: @unchecked Sendable {}
|
||||
extension PhotosPickerItem: @unchecked @retroactive Sendable {}
|
||||
|
|
|
@ -45,7 +45,8 @@ struct StatusActionButtonStyle: ButtonStyle {
|
|||
}
|
||||
}
|
||||
|
||||
struct SparklesView: View, Animatable {
|
||||
@MainActor
|
||||
struct SparklesView: View, @preconcurrency Animatable {
|
||||
var counter: Float
|
||||
var tint: Color
|
||||
var size: CGFloat
|
||||
|
|
|
@ -66,7 +66,7 @@ struct StatusRowTranslateView: View {
|
|||
generalTranslateButton
|
||||
.onChange(of: preferences.preferredTranslationType) { _, _ in
|
||||
withAnimation {
|
||||
_ = viewModel.updatePreferredTranslation()
|
||||
viewModel.updatePreferredTranslation()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue