Skip to content

Commit

Permalink
Add Option to Hide Lone Schema in Schema Menu
Browse files Browse the repository at this point in the history
  • Loading branch information
graphemecluster committed May 10, 2024
1 parent 980074c commit 03df405
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build/bin
Submodule bin updated 6 files
+1 −0 .gitignore
+67 −67 default.yaml
+6,240 −1,464 jyut6ping3.dict.yaml
+11,377 −6,601 jyut6ping3_scolar.dict.yaml
+81 −80 trime.yaml
+11 −11 weasel.yaml
8 changes: 8 additions & 0 deletions src/rime/gear/schema_list_translator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,14 @@ void SchemaListTranslation::LoadSchemaList(Switcher* switcher) {
return /* continue = */ true;
});
DLOG(INFO) << "num schemata: " << candies_.size();
if (candies_.size() == 1) {
bool hide_lone_schema = false;
config->GetBool("switcher/hide_lone_schema", &hide_lone_schema);
if (hide_lone_schema) {
Next();
return;
}
}
bool fix_order = false;
config->GetBool("switcher/fix_schema_list_order", &fix_order);
if (fix_order)
Expand Down

0 comments on commit 03df405

Please sign in to comment.