From 9fd62d3892715dbf7155ce1ae3f58f58c2e562a5 Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 2 Jun 2020 22:26:59 +0400 Subject: [PATCH] Add more deprecated system versions. --- Telegram/Resources/langs/lang.strings | 1 + Telegram/SourceFiles/window/window_outdated_bar.cpp | 13 ++++++++++++- Telegram/lib_base | 2 +- cmake | 2 +- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/Telegram/Resources/langs/lang.strings b/Telegram/Resources/langs/lang.strings index 16d2efddf..d3fa27af1 100644 --- a/Telegram/Resources/langs/lang.strings +++ b/Telegram/Resources/langs/lang.strings @@ -2251,6 +2251,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "lng_polls_votes_collapse" = "Collapse"; "lng_outdated_title" = "PLEASE UPDATE YOUR OPERATING SYSTEM."; +"lng_outdated_title_bits" = "PLEASE SWITCH TO 64 BIT OPERATING SYSTEM."; "lng_outdated_soon" = "Otherwise, Telegram Desktop will stop updating on {date}."; "lng_outdated_now" = "So that Telegram Desktop can update to newer versions."; diff --git a/Telegram/SourceFiles/window/window_outdated_bar.cpp b/Telegram/SourceFiles/window/window_outdated_bar.cpp index 545b499d5..9108195f4 100644 --- a/Telegram/SourceFiles/window/window_outdated_bar.cpp +++ b/Telegram/SourceFiles/window/window_outdated_bar.cpp @@ -42,11 +42,18 @@ private: }; +[[nodiscard]] rpl::producer OutdatedReasonPhrase() { + const auto why = Platform::WhySystemBecomesOutdated(); + return (why == Platform::OutdateReason::Is32Bit) + ? tr::lng_outdated_title_bits() + : tr::lng_outdated_title(); +} + Bar::Bar(not_null parent, QDate date) : _date(date) , _title( this, - tr::lng_outdated_title() | Ui::Text::ToUpper(), + OutdatedReasonPhrase() | Ui::Text::ToUpper(), st::windowOutdatedTitle) , _details(this, QString(), @@ -144,6 +151,7 @@ void Closed() { } // namespace object_ptr CreateOutdatedBar(not_null parent) { +#ifdef DESKTOP_APP_SPECIAL_TARGET const auto date = Platform::WhenSystemBecomesOutdated(); if (date.isNull()) { return { nullptr }; @@ -163,6 +171,9 @@ object_ptr CreateOutdatedBar(not_null parent) { }, wrap->lifetime()); return result; +#else // DESKTOP_APP_SPECIAL_TARGET + return { nullptr }; +#endif // DESKTOP_APP_SPECIAL_TARGET } } // namespace Window diff --git a/Telegram/lib_base b/Telegram/lib_base index 3fc4f2699..2f9ae1250 160000 --- a/Telegram/lib_base +++ b/Telegram/lib_base @@ -1 +1 @@ -Subproject commit 3fc4f2699e53ec225bb5052542255302e14b5ce4 +Subproject commit 2f9ae1250f36881ffb985b1e0af24be53481a9df diff --git a/cmake b/cmake index 7c151a302..63f0ef5c6 160000 --- a/cmake +++ b/cmake @@ -1 +1 @@ -Subproject commit 7c151a302a22ba362a0f02a5572b7b307cc3afe7 +Subproject commit 63f0ef5c6352b3ff1f3c862a53e6266cb599725f