From 20a0059f73208f614596d6836257ac017d023e45 Mon Sep 17 00:00:00 2001 From: Nico Verbruggen Date: Wed, 17 May 2023 20:10:41 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=8C=20Alter=20update=20notification=20?= =?UTF-8?q?for=20DEV=20&=20EAP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- phpmon/Domain/App/AppUpdater.swift | 18 +++++++++++++----- phpmon/Domain/Menu/MainMenu+Startup.swift | 3 --- phpmon/Localizable.strings | 3 ++- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/phpmon/Domain/App/AppUpdater.swift b/phpmon/Domain/App/AppUpdater.swift index 43b2fde..a2a985c 100644 --- a/phpmon/Domain/App/AppUpdater.swift +++ b/phpmon/Domain/App/AppUpdater.swift @@ -187,11 +187,19 @@ class AppUpdater { // Cleanup the upgrade.success file if FileSystem.fileExists("~/.config/phpmon/updater/upgrade.success") { Task { @MainActor in - LocalNotification.send( - title: "notification.phpmon_updated.title".localized, - subtitle: "notification.phpmon_updated.desc".localized(App.shortVersion), - preference: nil - ) + if App.identifier.contains(".phpmon.eap") || App.identifier.contains(".phpmon.dev") { + LocalNotification.send( + title: "notification.phpmon_updated.title".localized, + subtitle: "notification.phpmon_updated_dev.desc".localized(App.shortVersion, App.bundleVersion), + preference: nil + ) + } else { + LocalNotification.send( + title: "notification.phpmon_updated.title".localized, + subtitle: "notification.phpmon_updated.desc".localized(App.shortVersion), + preference: nil + ) + } } Log.info("The `upgrade.success` file was found! An update was installed. Cleaning up...") diff --git a/phpmon/Domain/Menu/MainMenu+Startup.swift b/phpmon/Domain/Menu/MainMenu+Startup.swift index e75308b..8a71c15 100644 --- a/phpmon/Domain/Menu/MainMenu+Startup.swift +++ b/phpmon/Domain/Menu/MainMenu+Startup.swift @@ -124,9 +124,6 @@ extension MainMenu { // Check if the linked version has changed between launches of phpmon PhpGuard().compareToLastGlobalVersion() - // Check if an update was performed earlier - AppUpdater.checkIfUpdateWasPerformed() - // We are ready! Log.info("PHP Monitor is ready to serve!") diff --git a/phpmon/Localizable.strings b/phpmon/Localizable.strings index 76bd2ce..5b2a263 100644 --- a/phpmon/Localizable.strings +++ b/phpmon/Localizable.strings @@ -426,7 +426,8 @@ This has no effect on other terminals, only for the particular terminal session "notification.preset_reverted_desc" = "The last preset you applied has been undone. Your previous configuration is now active."; "notification.phpmon_updated.title" = "PHP Monitor has been updated!"; -"notification.phpmon_updated.desc" = "You are now running PHP Monitor v%@."; +"notification.phpmon_updated.desc" = "You are now running PHP Monitor v%@. Thanks for staying up-to-date!"; +"notification.phpmon_updated_dev.desc" = "PHP Monitor v%@ (build %@) is now installed and active."; // Composer Update "alert.composer_missing.title" = "Composer not found!";