branch: elpa/hyperdrive
commit b0025a1a270d59016ef9f612de4784a26b310f25
Author: Joseph Turner <[email protected]>
Commit: Joseph Turner <[email protected]>

    Fix: (h/menu, h/menu-bar-mode) Display "Upgrade" button
---
 hyperdrive-menu.el | 5 ++++-
 hyperdrive.el      | 4 +++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/hyperdrive-menu.el b/hyperdrive-menu.el
index b21afb56a1..cd91e98649 100644
--- a/hyperdrive-menu.el
+++ b/hyperdrive-menu.el
@@ -218,7 +218,10 @@
      :description
      (lambda () (if (h/gateway-needs-upgrade-p) "Upgrade" "Install"))
      :transient t
-     :if-not (lambda () (or (h/gateway-installing-p) (h/gateway-installed-p))))
+     :if (lambda ()
+           (and (not (h/gateway-installing-p))
+                (or (not (h/gateway-installed-p))
+                    (h/gateway-needs-upgrade-p)))))
     ("G c" "Cancel install" h/cancel-install
      :transient t
      :if h/gateway-installing-p)
diff --git a/hyperdrive.el b/hyperdrive.el
index 0f0305db9f..9206561069 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -835,7 +835,9 @@ The return value of this function is the retrieval buffer."
       :label (cond ((h/gateway-needs-upgrade-p) "Upgrade gateway")
                    ((h/gateway-installed-p) "Reinstall gateway")
                    (t "Install gateway"))
-      :visible (not (hyperdrive-gateway-installing-p))
+      :visible (and (not (h/gateway-installing-p))
+                    (or (not (h/gateway-installed-p))
+                        (h/gateway-needs-upgrade-p)))
       :help "Download and install gateway"]
      ["Cancel install" h/cancel-install
       :visible (hyperdrive-gateway-installing-p)

Reply via email to