diff --git a/Applite/Model/Cask Data/Cask.swift b/Applite/Model/Cask Data/Cask.swift index 9f27a1d..3fcbdbb 100755 --- a/Applite/Model/Cask Data/Cask.swift +++ b/Applite/Model/Cask Data/Cask.swift @@ -7,7 +7,6 @@ import SwiftUI import os -import Combine /// Holds all essential data of a Homebrew cask and provides methods to run brew commands on it (e.g. install, uninstall, update) final class Cask: Identifiable, Decodable, Hashable, ObservableObject { diff --git a/Applite/Views/App Views/AppView.swift b/Applite/Views/App Views/AppView.swift index b30e854..5c9e354 100755 --- a/Applite/Views/App Views/AppView.swift +++ b/Applite/Views/App Views/AppView.swift @@ -142,7 +142,8 @@ struct AppView: View { } if self.role == .installAndManage { - DispatchQueue.main.asyncAfter(deadline: .now() + 1.5) { + Task { @MainActor in + try await Task.sleep(for: .seconds(1.5)) withAnimation(.spring(blendDuration: 1)) { successCheckmarkScale = 0.0001 } diff --git a/Applite/Views/Detail Views/DownloadView.swift b/Applite/Views/Detail Views/DownloadView.swift index f639636..0d43937 100755 --- a/Applite/Views/Detail Views/DownloadView.swift +++ b/Applite/Views/Detail Views/DownloadView.swift @@ -7,7 +7,6 @@ import SwiftUI import Fuse -import Combine /// Download section. Either dispays the `DiscoverView` or search results struct DownloadView: View { diff --git a/Applite/Views/SettingsView.swift b/Applite/Views/SettingsView.swift index e0023bf..206a5d7 100755 --- a/Applite/Views/SettingsView.swift +++ b/Applite/Views/SettingsView.swift @@ -54,7 +54,7 @@ struct SettingsView: View { .contentShape(Rectangle()) .onTapGesture { // Deselect textfield when clicking away - DispatchQueue.main.async { + Task { @MainActor in NSApp.keyWindow?.makeFirstResponder(nil) } }