aboutsummaryrefslogtreecommitdiff
path: root/test-from-git
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-05 09:36:23 -0500
committerCraig Jennings <c@cjennings.net>2026-05-05 09:36:23 -0500
commit4a16e9da8de558ce74eacab2bc72a2e38719b822 (patch)
tree1747787637b9632682d3c30a5e30a65a7cd0ffd1 /test-from-git
parent072b59b07545c9fb076c9181d16f7b2971b65421 (diff)
downloadorg-drill-4a16e9da8de558ce74eacab2bc72a2e38719b822.tar.gz
org-drill-4a16e9da8de558ce74eacab2bc72a2e38719b822.zip
refactor: extract org-drill--read-rating-key shared by reschedule and leitner-rebox
The two interactive rating loops (reschedule and leitner-rebox) shared roughly 60 lines of identical code: the same key-prompt string, the same memq-based exit-on-rating loop, the same arrow/ scroll/wheel cond, the same tags-key dispatch, and the same help-key toggle. Only two things differ — the rating-explanation help text and the per-rating action that follows — and the comment in leitner-rebox literally said "All this is shared with drill- reschedule. And what does it do?" Extracted org-drill--read-rating-key with two args: typed-answer (for the typed-answer flow's 'Your answer: ...' line) and rating-help-block (the multi-line ratings explanation specific to the scheduler). Both call sites collapse from ~50 lines of inlined loop to a single call. reschedule and leitner-rebox now consist of just the rating- specific actions plus this read-key call.
Diffstat (limited to 'test-from-git')
0 files changed, 0 insertions, 0 deletions