1
0
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:
2022-05-10 10:44:24 +02:00
parent 884784d024
commit 81b75dcaa8

View File

@ -153,8 +153,11 @@ extension DomainListVC {
secondButtonTitle: "Cancel",
style: .critical,
onFirstButtonPressed: {
Shell.run("valet unlink '\(site.name)'", requiresPath: true)
self.reloadDomains()
self.waitAndExecute {
Shell.run("valet unlink '\(site.name)'", requiresPath: true)
} completion: {
self.reloadDomains()
}
}
)
}
@ -172,8 +175,11 @@ extension DomainListVC {
secondButtonTitle: "Cancel",
style: .critical,
onFirstButtonPressed: {
Shell.run("valet unproxy '\(proxy.domain)'", requiresPath: true)
self.reloadDomains()
self.waitAndExecute {
Shell.run("valet unproxy '\(proxy.domain)'", requiresPath: true)
} completion: {
self.reloadDomains()
}
}
)
}