From bfe340c1639536a1b0ad33fe8acfebdf0dab6234 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Fri, 13 Oct 2023 12:14:55 +1000 Subject: [PATCH] Don't provide a button to copy estimated retention into desired retention It's too easy for the user to end up with silly values if their configured time/day is not reasonable. --- ftl/core/deck-config.ftl | 2 +- ts/deck-options/FsrsOptions.svelte | 20 +++----------------- 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/ftl/core/deck-config.ftl b/ftl/core/deck-config.ftl index 2ed47caf6..22dd0933a 100644 --- a/ftl/core/deck-config.ftl +++ b/ftl/core/deck-config.ftl @@ -338,7 +338,7 @@ deck-config-get-params = Get Params deck-config-fsrs-on-all-clients = Please ensure all of your Anki clients are Anki(Mobile) 23.10+ or AnkiDroid 2.17+. FSRS will not work correctly if one of your clients is older. -deck-config-set-optimal-retention = Set desired retention to { $num } +deck-config-estimated-retention = Estimated retention: { $num } deck-config-complete = { $num }% complete. deck-config-reschedule-cards-on-change = Reschedule cards on change diff --git a/ts/deck-options/FsrsOptions.svelte b/ts/deck-options/FsrsOptions.svelte index 34451ba33..96fee3c8f 100644 --- a/ts/deck-options/FsrsOptions.svelte +++ b/ts/deck-options/FsrsOptions.svelte @@ -188,18 +188,11 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html return tr.deckConfigComplete({ num: pct }); } - function stringForSetOptimalRetention(retention: number): String { + function estimatedRetention(retention: number): String { if (!retention) { return ""; } - return tr.deckConfigSetOptimalRetention({ num: retention.toFixed(2) }); - } - - function setDesiredRetentionToOptimal() { - if (!optimalRetention) { - return; - } - $config.desiredRetention = optimalRetention; + return tr.deckConfigEstimatedRetention({ num: retention.toFixed(2) }); } @@ -319,14 +312,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html {#if optimalRetention} - + {estimatedRetention(optimalRetention)} {/if}
{computeRetentionProgressString}