diff options
author | Leon Rische <leon.rische@me.com> | 2020-02-02 20:08:21 +0100 |
---|---|---|
committer | Leon Rische <leon.rische@me.com> | 2020-02-02 20:08:21 +0100 |
commit | 1ca35ff6e5d1de3cfefd6bf02c438a457e2f6fc8 (patch) | |
tree | f9cc62923b2088f712f4d88aacb9c7add171daeb /org-fc-review.el | |
parent | 490a7088dcc92e98943f540577f07aa80f3e45df (diff) |
Check if review history file exists before loading it
Diffstat (limited to 'org-fc-review.el')
-rw-r--r-- | org-fc-review.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/org-fc-review.el b/org-fc-review.el index 3674d73..869fcd3 100644 --- a/org-fc-review.el +++ b/org-fc-review.el @@ -36,7 +36,10 @@ (defun org-fc-make-review-session (cards) (make-instance 'org-fc-review-session - :ratings (plist-get (org-fc-awk-stats-reviews) :day) + :ratings + (if-let ((stats (org-fc-awk-stats-reviews))) + (plist-get stats :day) + '(:total 0 :again 0 :hard 0 :good 0 :easy 0)) :cards cards)) (defun org-fc-session-cards-pending-p (session) @@ -198,6 +201,7 @@ a review session." (delta (- now org-fc-timestamp))) (org-fc-session-add-rating org-fc-review--current-session rating) (org-fc-review-update-data path id position rating delta) + (org-fc-show-all) (save-buffer) ;; TODO: Conditional kill (unless org-fc-reviewing-existing-buffer |