summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-01-26 09:52:33 +0200
committerThanos Apollo <[email protected]>2024-01-26 09:52:33 +0200
commit2b1e1b80ac6257bda53de5992aca0f3854b3d246 (patch)
tree0c6c0c8bd5d005142d9719210f2d670118be217c
parentd3ef83c53f0429df62e7f1d4ce8d2fd814c0de74 (diff)
Fix gnosis-get-deck-due-notes
Returns list of due notes for deck.
-rw-r--r--gnosis.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/gnosis.el b/gnosis.el
index c4bae47..d99ae27 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -766,9 +766,10 @@ Optionally, add cusotm PROMPT."
if DUE is t, return only due notes"
(let* ((deck (or deck-id (gnosis--get-deck-id)))
- (notes (gnosis-select 'id 'notes `(= deck-id ,deck))))
- (cl-loop for note in (apply #'append notes)
- when (not (gnosis-suspended-p note))
+ (notes (gnosis-select 'id 'notes `(= deck-id ,deck) t)))
+ (cl-loop for note in notes
+ when (and (not (gnosis-suspended-p note))
+ (gnosis-review-is-due-p note))
collect note)))
(defun gnosis-past-or-present-p (date)