Skip to content

Commit

Permalink
Add winecfg awareness
Browse files Browse the repository at this point in the history
  • Loading branch information
vapidinfinity committed Mar 28, 2024
1 parent deb28c9 commit 9c344ef
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Mythic/Views/BottleList.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ struct BottleListView: View {
@State private var selectedBottleName: String = .init()
@State private var bottleNameToDelete: String = .init()

@State private var configuratorActive: Bool = false

var body: some View {
if let bottles = Wine.allBottles {
Form {
Expand Down Expand Up @@ -101,6 +103,12 @@ struct BottleListView: View {
)
}
}
.disabled(configuratorActive)
.task(priority: .background) {
Timer.scheduledTimer(withTimeInterval: 5.0, repeats: true) { timer in

Check warning on line 108 in Mythic/Views/BottleList.swift

View workflow job for this annotation

GitHub Actions / SwiftLint

Unused Closure Parameter Violation: Unused parameter in a closure should be replaced with _ (unused_closure_parameter)
configuratorActive = (try? Process.execute("/bin/bash", arguments: ["-c", "ps aux | grep winecfg | grep -v grep"]))?.isEmpty == false
}
}

Button("Close") {
isBottleSettingsViewPresented = false
Expand Down

0 comments on commit 9c344ef

Please sign in to comment.