mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Bring "Do Not Translate" to "Translate To" list top.
This commit is contained in:
parent
afd717b36e
commit
663e89662b
1 changed files with 8 additions and 2 deletions
|
@ -323,10 +323,16 @@ object_ptr<BoxContent> EditSkipTranslationLanguages() {
|
|||
object_ptr<BoxContent> ChooseTranslateToBox(
|
||||
LanguageId bringUp,
|
||||
Fn<void(LanguageId)> callback) {
|
||||
auto &settings = Core::App().settings();
|
||||
auto selected = std::vector<LanguageId>{
|
||||
Core::App().settings().translateTo(),
|
||||
settings.translateTo(),
|
||||
};
|
||||
if (bringUp && bringUp != selected.front()) {
|
||||
for (const auto &id : settings.skipTranslationLanguages()) {
|
||||
if (id != selected.front()) {
|
||||
selected.push_back(id);
|
||||
}
|
||||
}
|
||||
if (bringUp && ranges::contains(selected, bringUp)) {
|
||||
selected.push_back(bringUp);
|
||||
}
|
||||
return Box(ChooseLanguageBox, tr::lng_languages(), [=](
|
||||
|
|
Loading…
Add table
Reference in a new issue