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
+1
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.";
@@ -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
Submodule cmake updated: 7c151a302a...63f0ef5c63