FIX: Missing key in db and related error popup (thanks @iamllama)

This commit is contained in:
GithubAnon0000 2025-09-30 01:07:11 +02:00
parent 26b69008d8
commit 4debb0ddfc
4 changed files with 3 additions and 2 deletions

View file

@ -57,6 +57,7 @@ message ConfigKey {
LOAD_BALANCER_ENABLED = 26;
FSRS_SHORT_TERM_WITH_STEPS_ENABLED = 27;
FSRS_LEGACY_EVALUATE = 28;
SHOW_COLORED_BUTTONS = 29;
}
enum String {
SET_DUE_BROWSER = 0;

View file

@ -932,7 +932,7 @@ timerStopped = false;
else ""
)
if not self.mw.col.conf["showColor"]:
if not self.mw.col.get_config_bool(Config.Bool.SHOW_COLORED_BUTTONS):
return """
<td align=center><button %s title="%s" data-ease="%s" onclick='pycmd("ease%d");'>\
%s%s</button></td>""" % (

View file

@ -40,6 +40,7 @@ impl From<BoolKeyProto> for BoolKey {
BoolKeyProto::LoadBalancerEnabled => BoolKey::LoadBalancerEnabled,
BoolKeyProto::FsrsShortTermWithStepsEnabled => BoolKey::FsrsShortTermWithStepsEnabled,
BoolKeyProto::FsrsLegacyEvaluate => BoolKey::FsrsLegacyEvaluate,
BoolKeyProto::ShowColoredButtons => BoolKey::ShowColoredButtons,
}
}
}

View file

@ -54,7 +54,6 @@ pub enum BoolKey {
ShowRemainingDueCountsInStudy,
#[strum(to_string = "addToCur")]
AddingDefaultsToCurrentDeck,
#[strum(to_string = "showColor")]
ShowColoredButtons,
}