Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import DependenciesMacros
final class AttachToProcessViewController: UXKitViewController<AttachToProcessViewModel> {

override var shouldDisplayCommonLoading: Bool { true }

fileprivate static let shared = AttachToProcessViewController()

private let pickerViewController: RunningPickerTabViewController

Expand Down Expand Up @@ -73,10 +71,3 @@ extension AttachToProcessViewController: RunningPickerTabViewController.Delegate
cancelRelay.accept()
}
}

// MARK: - Dependencies

extension DependencyValues {
@DependencyEntry(liveValue: MainActor.assumeIsolated { AttachToProcessViewController.shared })
var attachToProcessViewController: AttachToProcessViewController
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import LateResponders
typealias MainTransition = SceneTransition<MainWindowController, MainSplitViewController>

final class MainCoordinator: SceneCoordinator<MainRoute, MainTransition>, LateResponderRegistering {
@Dependency(\.attachToProcessViewController) private var attachToProcessViewController

let documentState: DocumentState

Expand Down Expand Up @@ -86,7 +85,7 @@ final class MainCoordinator: SceneCoordinator<MainRoute, MainTransition>, LateRe
viewController.setupBindings(for: viewModel)
return .uxPopover(viewController, relativeTo: sender.bounds, of: sender, preferredEdge: .maxY, behavior: .transient, animates: true)
case .attachToProcess:
let viewController = attachToProcessViewController
let viewController = AttachToProcessViewController()
let viewModel = AttachToProcessViewModel(documentState: documentState, router: self)
viewController.setupBindings(for: viewModel)
viewController.preferredContentSize = .init(width: 800, height: 600)
Expand Down