Use module instead of package detection

Otherwise, the dashboard will break if the user has perspective.el
installed, instead of persp-mode.
This commit is contained in:
Henrik Lissner 2021-01-11 02:41:44 -05:00
parent 8cd7a1dbc6
commit f587630e17
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -48,7 +48,7 @@ Possible values:
(defvar +doom-dashboard-menu-sections (defvar +doom-dashboard-menu-sections
'(("Reload last session" '(("Reload last session"
:icon (all-the-icons-octicon "history" :face 'doom-dashboard-menu-title) :icon (all-the-icons-octicon "history" :face 'doom-dashboard-menu-title)
:when (cond ((require 'persp-mode nil t) :when (cond ((featurep! :ui workspaces)
(file-exists-p (expand-file-name persp-auto-save-fname persp-save-dir))) (file-exists-p (expand-file-name persp-auto-save-fname persp-save-dir)))
((require 'desktop nil t) ((require 'desktop nil t)
(file-exists-p (desktop-full-file-name)))) (file-exists-p (desktop-full-file-name))))