mirror of
https://github.com/nicoverbruggen/phpmon.git
synced 2025-08-07 12:00:09 +02:00
👌 Async unlink and unproxy to prevent main thread hang
This commit is contained in:
@ -153,8 +153,11 @@ extension DomainListVC {
|
|||||||
secondButtonTitle: "Cancel",
|
secondButtonTitle: "Cancel",
|
||||||
style: .critical,
|
style: .critical,
|
||||||
onFirstButtonPressed: {
|
onFirstButtonPressed: {
|
||||||
Shell.run("valet unlink '\(site.name)'", requiresPath: true)
|
self.waitAndExecute {
|
||||||
self.reloadDomains()
|
Shell.run("valet unlink '\(site.name)'", requiresPath: true)
|
||||||
|
} completion: {
|
||||||
|
self.reloadDomains()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -172,8 +175,11 @@ extension DomainListVC {
|
|||||||
secondButtonTitle: "Cancel",
|
secondButtonTitle: "Cancel",
|
||||||
style: .critical,
|
style: .critical,
|
||||||
onFirstButtonPressed: {
|
onFirstButtonPressed: {
|
||||||
Shell.run("valet unproxy '\(proxy.domain)'", requiresPath: true)
|
self.waitAndExecute {
|
||||||
self.reloadDomains()
|
Shell.run("valet unproxy '\(proxy.domain)'", requiresPath: true)
|
||||||
|
} completion: {
|
||||||
|
self.reloadDomains()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user