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()
This commit is contained in:
Abdo 2024-02-22 07:09:17 +03:00 committed by GitHub
parent 8b18a08b3b
commit 00c67fc0c7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 0 deletions

View file

@ -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

View file

@ -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;
}