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)))))
(defun doom-dashboard-widget-loaded ()
(insert
"\n\n"
(propertize
(+doom-dashboard--center
+doom-dashboard--width
(doom-display-benchmark-h 'return))
'face 'doom-dashboard-loaded)
"\n"))
(when doom-init-time
(insert
"\n\n"
(propertize
(+doom-dashboard--center
+doom-dashboard--width
(doom-display-benchmark-h 'return))
'face 'doom-dashboard-loaded)
"\n")))
(defun doom-dashboard-widget-shortmenu ()
(let ((all-the-icons-scale-factor 1.45)