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