Add more deprecated system versions.

This commit is contained in:
John Preston 2020-06-02 22:26:59 +04:00
parent 793906ca9a
commit 9fd62d3892
4 changed files with 15 additions and 3 deletions

View File

@ -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.";

View File

@ -42,11 +42,18 @@ private:
};
[[nodiscard]] rpl::producer<QString> OutdatedReasonPhrase() {
const auto why = Platform::WhySystemBecomesOutdated();
return (why == Platform::OutdateReason::Is32Bit)
? tr::lng_outdated_title_bits()
: tr::lng_outdated_title();
}
Bar::Bar(not_null<QWidget*> 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<Ui::RpWidget> CreateOutdatedBar(not_null<QWidget*> parent) {
#ifdef DESKTOP_APP_SPECIAL_TARGET
const auto date = Platform::WhenSystemBecomesOutdated();
if (date.isNull()) {
return { nullptr };
@ -163,6 +171,9 @@ object_ptr<Ui::RpWidget> CreateOutdatedBar(not_null<QWidget*> parent) {
}, wrap->lifetime());
return result;
#else // DESKTOP_APP_SPECIAL_TARGET
return { nullptr };
#endif // DESKTOP_APP_SPECIAL_TARGET
}
} // namespace Window

@ -1 +1 @@
Subproject commit 3fc4f2699e53ec225bb5052542255302e14b5ce4
Subproject commit 2f9ae1250f36881ffb985b1e0af24be53481a9df

2
cmake

@ -1 +1 @@
Subproject commit 7c151a302a22ba362a0f02a5572b7b307cc3afe7
Subproject commit 63f0ef5c6352b3ff1f3c862a53e6266cb599725f