summaryrefslogtreecommitdiff
path: root/gnosis.el
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-05-10 14:02:24 +0300
committerThanos Apollo <[email protected]>2024-05-10 14:02:24 +0300
commitb919351d70d70e3d5c3dc7a16ccaf4e703f16b7f (patch)
tree57eca66174a2c2a53c8449d0b72b1b09adfd4a29 /gnosis.el
parent97494e078156dd4875ff37869c87e8de11fad3dc (diff)
Add gnosis-get-note-ff
Diffstat (limited to 'gnosis.el')
-rw-r--r--gnosis.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/gnosis.el b/gnosis.el
index dba94e5..a951664 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -499,6 +499,15 @@ If NAME is t, return name of deck."
(let* ((id-clause `(= id ,id))
(deck-ff (gnosis-get 'failure-factor 'decks id-clause)))
deck-ff))
+
+(defun gnosis-get-note-ff (id)
+ "Return failure factor for note ID.."
+ (let ((deck-ff (gnosis-get-deck-ff (gnosis-get-deck--note id)))
+ (note-ff (gnosis-get 'ff 'review `(= id ,id))))
+ deck-ff
+ ;; (max deck-ff note-ff)
+ ))
+
(cl-defun gnosis-suspend-note (id)
"Suspend note with ID."
(let ((suspended (= (gnosis-get 'suspend 'review-log `(= id ,id)) 1)))