mirror of
https://github.com/nicoverbruggen/phpmon.git
synced 2025-12-21 03:10:06 +01:00
🐛 Ensure the menu reloads upon preference edits
This commit is contained in:
@@ -22,7 +22,11 @@ class PhpPreference {
|
|||||||
|
|
||||||
internal static func persistToIniFile(key: String, value: String) async throws {
|
internal static func persistToIniFile(key: String, value: String) async throws {
|
||||||
if let file = App.shared.container.phpEnvs.getConfigFile(forKey: key) {
|
if let file = App.shared.container.phpEnvs.getConfigFile(forKey: key) {
|
||||||
return try await file.replace(key: key, value: value)
|
// Do the replacement
|
||||||
|
try await file.replace(key: key, value: value)
|
||||||
|
// Reload the main menu item to reflect these new values
|
||||||
|
Task { @MainActor in MainMenu.shared.reloadPhpMonitorMenuInBackground() }
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
throw PhpConfigurationFile.ReplacementErrors.missingFile
|
throw PhpConfigurationFile.ReplacementErrors.missingFile
|
||||||
|
|||||||
Reference in New Issue
Block a user