From 4659d5db5dbf46b262c59223ac7b5d2d4c64f0fd Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 4 Jun 2025 21:35:43 +0400 Subject: [PATCH] Version 5.15. - Send Direct Messages to Channels. - Enable New Tab Layout for Topics. - Create Polls with Up To 12 Options. --- Telegram/Resources/uwp/AppX/AppxManifest.xml | 2 +- Telegram/Resources/winrc/Telegram.rc | 8 ++++---- Telegram/Resources/winrc/Updater.rc | 8 ++++---- Telegram/SourceFiles/boxes/peer_list_controllers.cpp | 2 +- .../SourceFiles/boxes/send_gif_with_caption_box.cpp | 2 -- Telegram/SourceFiles/core/version.h | 4 ++-- .../history/view/history_view_chat_section.cpp | 3 --- .../history/view/history_view_subsection_tabs.cpp | 6 +++--- .../history/view/history_view_subsection_tabs.h | 4 ++-- .../platform/linux/notifications_manager_linux.cpp | 7 ++++--- .../platform/mac/notifications_manager_mac.mm | 2 +- .../SourceFiles/ui/controls/subsection_tabs_slider.cpp | 5 +---- .../SourceFiles/ui/controls/subsection_tabs_slider.h | 2 -- Telegram/SourceFiles/ui/dynamic_thumbnails.h | 2 +- Telegram/SourceFiles/ui/unread_badge.cpp | 2 +- Telegram/build/version | 10 +++++----- changelog.txt | 6 ++++++ 17 files changed, 36 insertions(+), 39 deletions(-) diff --git a/Telegram/Resources/uwp/AppX/AppxManifest.xml b/Telegram/Resources/uwp/AppX/AppxManifest.xml index 0510faaad4..f72376f831 100644 --- a/Telegram/Resources/uwp/AppX/AppxManifest.xml +++ b/Telegram/Resources/uwp/AppX/AppxManifest.xml @@ -10,7 +10,7 @@ + Version="5.15.0.0" /> Telegram Desktop Telegram Messenger LLP diff --git a/Telegram/Resources/winrc/Telegram.rc b/Telegram/Resources/winrc/Telegram.rc index 2ed18d704b..e119d657b5 100644 --- a/Telegram/Resources/winrc/Telegram.rc +++ b/Telegram/Resources/winrc/Telegram.rc @@ -44,8 +44,8 @@ IDI_ICON1 ICON "..\\art\\icon256.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 5,14,3,0 - PRODUCTVERSION 5,14,3,0 + FILEVERSION 5,15,0,0 + PRODUCTVERSION 5,15,0,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -62,10 +62,10 @@ BEGIN BEGIN VALUE "CompanyName", "Telegram FZ-LLC" VALUE "FileDescription", "Telegram Desktop" - VALUE "FileVersion", "5.14.3.0" + VALUE "FileVersion", "5.15.0.0" VALUE "LegalCopyright", "Copyright (C) 2014-2025" VALUE "ProductName", "Telegram Desktop" - VALUE "ProductVersion", "5.14.3.0" + VALUE "ProductVersion", "5.15.0.0" END END BLOCK "VarFileInfo" diff --git a/Telegram/Resources/winrc/Updater.rc b/Telegram/Resources/winrc/Updater.rc index 2b9ca09531..f2d7d8b38e 100644 --- a/Telegram/Resources/winrc/Updater.rc +++ b/Telegram/Resources/winrc/Updater.rc @@ -35,8 +35,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // VS_VERSION_INFO VERSIONINFO - FILEVERSION 5,14,3,0 - PRODUCTVERSION 5,14,3,0 + FILEVERSION 5,15,0,0 + PRODUCTVERSION 5,15,0,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -53,10 +53,10 @@ BEGIN BEGIN VALUE "CompanyName", "Telegram FZ-LLC" VALUE "FileDescription", "Telegram Desktop Updater" - VALUE "FileVersion", "5.14.3.0" + VALUE "FileVersion", "5.15.0.0" VALUE "LegalCopyright", "Copyright (C) 2014-2025" VALUE "ProductName", "Telegram Desktop" - VALUE "ProductVersion", "5.14.3.0" + VALUE "ProductVersion", "5.15.0.0" END END BLOCK "VarFileInfo" diff --git a/Telegram/SourceFiles/boxes/peer_list_controllers.cpp b/Telegram/SourceFiles/boxes/peer_list_controllers.cpp index c33da2ab35..37ab361a8f 100644 --- a/Telegram/SourceFiles/boxes/peer_list_controllers.cpp +++ b/Telegram/SourceFiles/boxes/peer_list_controllers.cpp @@ -1275,7 +1275,7 @@ std::unique_ptr ChooseSublistBoxController::createSearchRow( auto ChooseSublistBoxController::createRow( not_null sublist) -> std::unique_ptr { - if (const auto skip = _filter && !_filter(sublist)) { + if (_filter && !_filter(sublist)) { return nullptr; } auto result = std::make_unique(sublist->sublistPeer()); diff --git a/Telegram/SourceFiles/boxes/send_gif_with_caption_box.cpp b/Telegram/SourceFiles/boxes/send_gif_with_caption_box.cpp index f375f65349..7deadbe2f0 100644 --- a/Telegram/SourceFiles/boxes/send_gif_with_caption_box.cpp +++ b/Telegram/SourceFiles/boxes/send_gif_with_caption_box.cpp @@ -245,8 +245,6 @@ void CaptionBox( box->setWidth(st::boxWidth); box->getDelegate()->setStyle(st::sendGifBox); - const auto container = box->verticalLayout(); - const auto input = AddInputField(box, controller); box->setFocusCallback([=] { input->setFocus(); diff --git a/Telegram/SourceFiles/core/version.h b/Telegram/SourceFiles/core/version.h index 4e9087855b..f52d1ee876 100644 --- a/Telegram/SourceFiles/core/version.h +++ b/Telegram/SourceFiles/core/version.h @@ -22,7 +22,7 @@ constexpr auto AppId = "{53F49750-6209-4FBF-9CA8-7A333C87D1ED}"_cs; constexpr auto AppNameOld = "Telegram Win (Unofficial)"_cs; constexpr auto AppName = "Telegram Desktop"_cs; constexpr auto AppFile = "Telegram"_cs; -constexpr auto AppVersion = 5014003; -constexpr auto AppVersionStr = "5.14.3"; +constexpr auto AppVersion = 5015000; +constexpr auto AppVersionStr = "5.15"; constexpr auto AppBetaVersion = false; constexpr auto AppAlphaVersion = TDESKTOP_ALPHA_VERSION; diff --git a/Telegram/SourceFiles/history/view/history_view_chat_section.cpp b/Telegram/SourceFiles/history/view/history_view_chat_section.cpp index 9c3c948da9..a66c10b819 100644 --- a/Telegram/SourceFiles/history/view/history_view_chat_section.cpp +++ b/Telegram/SourceFiles/history/view/history_view_chat_section.cpp @@ -2978,9 +2978,6 @@ rpl::producer ChatWidget::sublistSource( Data::MessagePosition aroundId, int limitBefore, int limitAfter) { - const auto messageId = aroundId.fullId.msg - ? aroundId.fullId.msg - : (ServerMaxMsgId - 1); return _sublist->source( aroundId, limitBefore, diff --git a/Telegram/SourceFiles/history/view/history_view_subsection_tabs.cpp b/Telegram/SourceFiles/history/view/history_view_subsection_tabs.cpp index 207bd4b1cb..b070db4ca1 100644 --- a/Telegram/SourceFiles/history/view/history_view_subsection_tabs.cpp +++ b/Telegram/SourceFiles/history/view/history_view_subsection_tabs.cpp @@ -41,7 +41,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL namespace HistoryView { namespace { -constexpr auto kDefaultLimit = 5; AssertIsDebug()// 10; +constexpr auto kDefaultLimit = 12; } // namespace @@ -349,7 +349,7 @@ void SubsectionTabs::setupSlider( ? was : Ui::MakeUserpicThumbnail(peer); sections.push_back({ - .text = peer->shortName(), + .text = { peer->shortName() }, .userpic = std::move(userpic), }); } else { @@ -363,7 +363,7 @@ void SubsectionTabs::setupSlider( } } else { sections.push_back({ - .text = tr::lng_filters_all_short(tr::now), + .text = { tr::lng_filters_all_short(tr::now) }, .userpic = Ui::MakeAllSubsectionsThumbnail(textFg), }); } diff --git a/Telegram/SourceFiles/history/view/history_view_subsection_tabs.h b/Telegram/SourceFiles/history/view/history_view_subsection_tabs.h index 15cf7c6d75..ef775ee8f4 100644 --- a/Telegram/SourceFiles/history/view/history_view_subsection_tabs.h +++ b/Telegram/SourceFiles/history/view/history_view_subsection_tabs.h @@ -69,10 +69,10 @@ private: DocumentId iconId = 0; QString name; - friend inline constexpr auto operator<=>( + friend inline auto operator<=>( const Item &, const Item &) = default; - friend inline constexpr bool operator==( + friend inline bool operator==( const Item &, const Item &) = default; }; diff --git a/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp b/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp index 8303e0d033..f73fceab05 100644 --- a/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp @@ -369,9 +369,10 @@ Manager::Private::Private(not_null manager) .contextId = ContextId{ .sessionId = dict.lookup_value("session").get_uint64(), .peerId = PeerId(dict.lookup_value("peer").get_uint64()), - .topicRootId = dict.lookup_value("topic").get_int64(), - .monoforumPeerId = dict.lookup_value( - "monoforumpeer").get_uint64(), + .topicRootId = MsgId( + dict.lookup_value("topic").get_int64()), + .monoforumPeerId = PeerId(dict.lookup_value( + "monoforumpeer").get_uint64()), }, .msgId = dict.lookup_value("msgid").get_int64(), }; diff --git a/Telegram/SourceFiles/platform/mac/notifications_manager_mac.mm b/Telegram/SourceFiles/platform/mac/notifications_manager_mac.mm index 7ab8462891..b92cd90f55 100644 --- a/Telegram/SourceFiles/platform/mac/notifications_manager_mac.mm +++ b/Telegram/SourceFiles/platform/mac/notifications_manager_mac.mm @@ -249,7 +249,7 @@ private: }; struct ClearFromSublist { ContextId contextId; - } + }; struct ClearFromHistory { ContextId partialContextId; }; diff --git a/Telegram/SourceFiles/ui/controls/subsection_tabs_slider.cpp b/Telegram/SourceFiles/ui/controls/subsection_tabs_slider.cpp index eae444f628..2cc4fcabdd 100644 --- a/Telegram/SourceFiles/ui/controls/subsection_tabs_slider.cpp +++ b/Telegram/SourceFiles/ui/controls/subsection_tabs_slider.cpp @@ -300,7 +300,6 @@ void SubsectionSlider::setupBar() { }, _bar->lifetime()); _bar->paintRequest() | rpl::start_with_next([=](QRect clip) { const auto start = -_barSt.stroke / 2; - const auto finalRange = getFinalActiveRange(); const auto currentRange = getCurrentActiveRange(); const auto from = currentRange.from + _barSt.skip; const auto size = currentRange.size - 2 * _barSt.skip; @@ -471,7 +470,6 @@ bool SubsectionSlider::buttonPaused() { } float64 SubsectionSlider::buttonActive(not_null button) { - const auto finalRange = getFinalActiveRange(); const auto currentRange = getCurrentActiveRange(); const auto from = _vertical ? button->y() : button->x(); const auto size = _vertical ? button->height() : button->width(); @@ -505,8 +503,7 @@ not_null SubsectionSlider::buttonAt(int index) { } VerticalSlider::VerticalSlider(not_null parent) -: SubsectionSlider(parent, true) -, _st(st::chatTabsVertical) { +: SubsectionSlider(parent, true) { } VerticalSlider::~VerticalSlider() = default; diff --git a/Telegram/SourceFiles/ui/controls/subsection_tabs_slider.h b/Telegram/SourceFiles/ui/controls/subsection_tabs_slider.h index 30d35aa190..d793085b04 100644 --- a/Telegram/SourceFiles/ui/controls/subsection_tabs_slider.h +++ b/Telegram/SourceFiles/ui/controls/subsection_tabs_slider.h @@ -148,8 +148,6 @@ private: std::unique_ptr makeButton( SubsectionTab &&data) override; - const style::ChatTabsVertical &_st; - }; class HorizontalSlider final : public SubsectionSlider { diff --git a/Telegram/SourceFiles/ui/dynamic_thumbnails.h b/Telegram/SourceFiles/ui/dynamic_thumbnails.h index 6e003bbe35..e58c300fab 100644 --- a/Telegram/SourceFiles/ui/dynamic_thumbnails.h +++ b/Telegram/SourceFiles/ui/dynamic_thumbnails.h @@ -34,7 +34,7 @@ class DynamicImage; [[nodiscard]] std::shared_ptr MakeEmojiThumbnail( not_null owner, const QString &data, - Fn paused = false, + Fn paused = nullptr, Fn textColor = nullptr); [[nodiscard]] std::shared_ptr MakePhotoThumbnail( not_null photo, diff --git a/Telegram/SourceFiles/ui/unread_badge.cpp b/Telegram/SourceFiles/ui/unread_badge.cpp index 8730b46c58..88f6d376d7 100644 --- a/Telegram/SourceFiles/ui/unread_badge.cpp +++ b/Telegram/SourceFiles/ui/unread_badge.cpp @@ -139,7 +139,7 @@ int PeerBadge::drawGetWidth(Painter &p, Descriptor &&descriptor) { const auto peer = descriptor.peer; if ((descriptor.scam && (peer->isScam() || peer->isFake())) - || descriptor.direct && peer->isMonoforum()) { + || (descriptor.direct && peer->isMonoforum())) { return drawTextBadge(p, descriptor); } const auto verifyCheck = descriptor.verified && peer->isVerified(); diff --git a/Telegram/build/version b/Telegram/build/version index af8ef69b2c..2ffce92c2c 100644 --- a/Telegram/build/version +++ b/Telegram/build/version @@ -1,7 +1,7 @@ -AppVersion 5014003 -AppVersionStrMajor 5.14 -AppVersionStrSmall 5.14.3 -AppVersionStr 5.14.3 +AppVersion 5015000 +AppVersionStrMajor 5.15 +AppVersionStrSmall 5.15 +AppVersionStr 5.15.0 BetaChannel 0 AlphaVersion 0 -AppVersionOriginal 5.14.3 +AppVersionOriginal 5.15 diff --git a/changelog.txt b/changelog.txt index f9fc66744e..3e4dbdc0f1 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,9 @@ +5.15 (04.06.25) + +- Send Direct Messages to Channels. +- Enable New Tab Layout for Topics. +- Create Polls with Up To 12 Options. + 5.14.3 (18.05.25) - Fix stale birthday suggestions removing.