1
0
mirror of https://github.com/nicoverbruggen/phpmon.git synced 2025-12-20 19:10:05 +01:00

🐛 Ensure the menu reloads upon preference edits

This commit is contained in:
2025-12-06 12:48:09 +01:00
parent 9e355b5145
commit b918238acb

View File

@@ -22,7 +22,11 @@ class PhpPreference {
internal static func persistToIniFile(key: String, value: String) async throws {
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