summaryrefslogtreecommitdiff
path: root/org-fc-dashboard.el
diff options
context:
space:
mode:
Diffstat (limited to 'org-fc-dashboard.el')
-rw-r--r--org-fc-dashboard.el32
1 files changed, 17 insertions, 15 deletions
diff --git a/org-fc-dashboard.el b/org-fc-dashboard.el
index 7f9357c..97dab2e 100644
--- a/org-fc-dashboard.el
+++ b/org-fc-dashboard.el
@@ -117,22 +117,24 @@
(insert "\n")
- (insert
- (propertize " Review Statistics\n\n" 'face 'org-level-1))
-
- (dolist (scope '((:day . "Day")
- (:week . "Week")
- (:month . "Month")
- (:all . "All")))
- (when-let (stat (plist-get reviews-stats (car scope)))
- (when (plusp (plist-get stat :total))
- (insert (propertize (format " %s (%d)\n" (cdr scope) (plist-get stat :total)) 'face 'org-level-1))
- (insert " ")
- (insert-image (org-fc-dashboard-bar-chart stat))
- (insert (org-fc-dashboard-percent-right stat))
- (insert "\n\n"))))
+ (when reviews-stats
+ (insert
+ (propertize " Review Statistics\n\n" 'face 'org-level-1))
+
+ (dolist (scope '((:day . "Day")
+ (:week . "Week")
+ (:month . "Month")
+ (:all . "All")))
+ (when-let (stat (plist-get reviews-stats (car scope)))
+ (when (plusp (plist-get stat :total))
+ (insert (propertize (format " %s (%d)\n" (cdr scope) (plist-get stat :total)) 'face 'org-level-1))
+ (insert " ")
+ (insert-image (org-fc-dashboard-bar-chart stat))
+ (insert (org-fc-dashboard-percent-right stat))
+ (insert "\n\n"))))
+
+ (insert "\n"))
- (insert "\n")
(insert
(propertize " [r] Review\n" 'face 'org-level-1))
(insert