From 00c67fc0c7d90dba1fb5418da38b41c855f8409a Mon Sep 17 00:00:00 2001 From: Abdo Date: Thu, 22 Feb 2024 07:09:17 +0300 Subject: [PATCH] Show message if current FSRS parameters are optimal (#3014) * Show message if current FSRS parameters are optimal * Fix message shown with default parameters * Use alert() --- ftl/core/deck-config.ftl | 1 + ts/deck-options/FsrsOptions.svelte | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/ftl/core/deck-config.ftl b/ftl/core/deck-config.ftl index e9e902264..36c7b0362 100644 --- a/ftl/core/deck-config.ftl +++ b/ftl/core/deck-config.ftl @@ -431,6 +431,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-wait-for-audio = Wait for audio deck-config-show-reminder = Show Reminder diff --git a/ts/deck-options/FsrsOptions.svelte b/ts/deck-options/FsrsOptions.svelte index 5a438ff5d..daec3a559 100644 --- a/ts/deck-options/FsrsOptions.svelte +++ b/ts/deck-options/FsrsOptions.svelte @@ -116,6 +116,12 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html ignoreRevlogsBeforeMs: getIgnoreRevlogsBeforeMs(), currentWeights: $config.fsrsWeights, }); + if ( + $config.fsrsWeights.length && + $config.fsrsWeights.every((n, i) => n === resp.weights[i]) + ) { + alert(tr.deckConfigFsrsParamsOptimal()); + } if (computeWeightsProgress) { computeWeightsProgress.current = computeWeightsProgress.total; }