Skip to content

Commit

Permalink
Fix lang keys access on startup.
Browse files Browse the repository at this point in the history
  • Loading branch information
john-preston authored and 23rd committed Nov 15, 2023
1 parent 12272a4 commit 99da958
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Telegram/SourceFiles/window/themes/window_themes_embedded.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,9 @@ std::vector<EmbeddedScheme> EmbeddedThemes() {
const auto qColor = [](auto hex) {
return style::ColorFromHex(hex);
};
const auto name = [](auto key) {
return rpl::deferred([=] { return key(); });
};
return {
EmbeddedScheme{
EmbeddedType::Default,
Expand All @@ -221,7 +224,7 @@ std::vector<EmbeddedScheme> EmbeddedThemes() {
qColor("ffffff"),
qColor("eaffdc"),
qColor("ffffff"),
tr::lng_settings_theme_classic(),
name(tr::lng_settings_theme_classic),
QString(),
qColor("40a7e3")
},
Expand All @@ -232,7 +235,7 @@ std::vector<EmbeddedScheme> EmbeddedThemes() {
qColor("ffffff"),
qColor("d7f0ff"),
qColor("ffffff"),
tr::lng_settings_theme_day(),
name(tr::lng_settings_theme_day),
":/gui/day-blue.tdesktop-theme",
qColor("40a7e3")
},
Expand All @@ -243,7 +246,7 @@ std::vector<EmbeddedScheme> EmbeddedThemes() {
qColor("6b808d"),
qColor("6b808d"),
qColor("5ca7d4"),
tr::lng_settings_theme_tinted(),
name(tr::lng_settings_theme_tinted),
":/gui/night.tdesktop-theme",
qColor("5288c1")
},
Expand All @@ -254,7 +257,7 @@ std::vector<EmbeddedScheme> EmbeddedThemes() {
qColor("6b808d"),
qColor("6b808d"),
qColor("75bfb5"),
tr::lng_settings_theme_night(),
name(tr::lng_settings_theme_night),
":/gui/night-green.tdesktop-theme",
qColor("3fc1b0")
},
Expand Down

0 comments on commit 99da958

Please sign in to comment.