mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-02-02 11:12:20 +00:00
Swiftformat
This commit is contained in:
parent
06629cc397
commit
83e4e74329
22 changed files with 171 additions and 169 deletions
|
@ -5,9 +5,9 @@ import Env
|
|||
import Foundation
|
||||
import Models
|
||||
import Network
|
||||
import Nuke
|
||||
import SwiftUI
|
||||
import Timeline
|
||||
import Nuke
|
||||
|
||||
struct SettingsTabs: View {
|
||||
@Environment(\.dismiss) private var dismiss
|
||||
|
|
|
@ -4,7 +4,6 @@ import SwiftUI
|
|||
|
||||
@MainActor
|
||||
class EditAccountViewModel: ObservableObject {
|
||||
|
||||
class FieldEditViewModel: ObservableObject, Identifiable {
|
||||
let id = UUID().uuidString
|
||||
@Published var name: String = ""
|
||||
|
|
|
@ -10,6 +10,7 @@ public class QuickLook: ObservableObject {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Published public private(set) var urls: [URL] = []
|
||||
@Published public private(set) var isPreparing: Bool = false
|
||||
@Published public private(set) var latestError: Error?
|
||||
|
@ -73,7 +74,7 @@ public class QuickLook: ObservableObject {
|
|||
return path
|
||||
}
|
||||
|
||||
private func cleanup(urls: [URL]) {
|
||||
private func cleanup(urls _: [URL]) {
|
||||
try? FileManager.default.removeItem(at: quickLookDir)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -190,7 +190,8 @@ public struct UpdateCredentialsData: Encodable, Sendable {
|
|||
bot: Bool,
|
||||
locked: Bool,
|
||||
discoverable: Bool,
|
||||
fieldsAttributes: [FieldData]) {
|
||||
fieldsAttributes: [FieldData])
|
||||
{
|
||||
self.displayName = displayName
|
||||
self.note = note
|
||||
self.source = source
|
||||
|
@ -204,5 +205,4 @@ public struct UpdateCredentialsData: Encodable, Sendable {
|
|||
}
|
||||
self.fieldsAttributes = fieldAttributes
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -197,7 +197,6 @@ public extension URL {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
extension UIImage {
|
||||
func resized(to size: CGSize) -> UIImage {
|
||||
UIGraphicsImageRenderer(size: size).image { _ in
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import Foundation
|
||||
import SwiftUI
|
||||
import Models
|
||||
import SwiftUI
|
||||
|
||||
@MainActor
|
||||
class StatusEmbedCache {
|
||||
|
|
|
@ -99,7 +99,8 @@ public class StatusRowViewModel: ObservableObject {
|
|||
isFiltered = filter != nil
|
||||
|
||||
if let url = embededStatusURL(),
|
||||
let embed = StatusEmbedCache.shared.get(url: url) {
|
||||
let embed = StatusEmbedCache.shared.get(url: url)
|
||||
{
|
||||
isEmbedLoading = false
|
||||
embeddedStatus = embed
|
||||
}
|
||||
|
@ -159,7 +160,8 @@ public class StatusRowViewModel: ObservableObject {
|
|||
let content = status.reblog?.content ?? status.content
|
||||
if !content.statusesURLs.isEmpty,
|
||||
let url = content.statusesURLs.first,
|
||||
client.hasConnection(with: url) {
|
||||
client.hasConnection(with: url)
|
||||
{
|
||||
return url
|
||||
}
|
||||
return nil
|
||||
|
@ -167,7 +169,8 @@ public class StatusRowViewModel: ObservableObject {
|
|||
|
||||
func loadEmbeddedStatus() async {
|
||||
guard embeddedStatus == nil,
|
||||
let url = embededStatusURL() else {
|
||||
let url = embededStatusURL()
|
||||
else {
|
||||
if isEmbedLoading {
|
||||
isEmbedLoading = false
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue