fix(doom-dashboard): hide benchmark until available

The dashboard has a chance to display before doom-init-time is
calculated. To prevent the resulting type error, hide it until it is
ready.
This commit is contained in:
Henrik Lissner 2022-09-24 21:36:57 +02:00
parent 8c442d84b9
commit 29dfce32bd
No known key found for this signature in database
GPG key ID: B60957CA074D39A3

View file

@ -445,14 +445,15 @@ What it is set to is controlled by `+doom-dashboard-pwd-policy'."
?\n))))) ?\n)))))
(defun doom-dashboard-widget-loaded () (defun doom-dashboard-widget-loaded ()
(insert (when doom-init-time
"\n\n" (insert
(propertize "\n\n"
(+doom-dashboard--center (propertize
+doom-dashboard--width (+doom-dashboard--center
(doom-display-benchmark-h 'return)) +doom-dashboard--width
'face 'doom-dashboard-loaded) (doom-display-benchmark-h 'return))
"\n")) 'face 'doom-dashboard-loaded)
"\n")))
(defun doom-dashboard-widget-shortmenu () (defun doom-dashboard-widget-shortmenu ()
(let ((all-the-icons-scale-factor 1.45) (let ((all-the-icons-scale-factor 1.45)