diff --git a/ftl/core/deck-config.ftl b/ftl/core/deck-config.ftl index c726cb5d1..15e87d776 100644 --- a/ftl/core/deck-config.ftl +++ b/ftl/core/deck-config.ftl @@ -452,6 +452,7 @@ deck-config-percent-of-reviews = deck-config-optimizing-preset = Optimizing preset { $current_count }/{ $total_count }... deck-config-fsrs-must-be-enabled = FSRS must be enabled first. deck-config-fsrs-params-optimal = The FSRS parameters currently appear to be optimal. +deck-config-fsrs-params-no-reviews = No reviews found. Please check that this preset is assigned to all decks you want to optimize (including subdecks) and try again. deck-config-wait-for-audio = Wait for audio deck-config-show-reminder = Show Reminder diff --git a/ts/routes/deck-options/FsrsOptions.svelte b/ts/routes/deck-options/FsrsOptions.svelte index 173ea8d51..921187716 100644 --- a/ts/routes/deck-options/FsrsOptions.svelte +++ b/ts/routes/deck-options/FsrsOptions.svelte @@ -148,14 +148,19 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html ignoreRevlogsBeforeMs: getIgnoreRevlogsBeforeMs(), currentParams: params, }); - if ( + + const already_optimal = (params.length && params.every( (n, i) => n.toFixed(4) === resp.params[i].toFixed(4), )) || - resp.params.length === 0 - ) { - setTimeout(() => alert(tr.deckConfigFsrsParamsOptimal()), 200); + resp.params.length === 0; + + if (already_optimal) { + const msg = resp.fsrsItems + ? tr.deckConfigFsrsParamsOptimal() + : tr.deckConfigFsrsParamsNoReviews(); + setTimeout(() => alert(msg), 200); } else { $config.fsrsParams5 = resp.params; }