From f16d1f034fbb958f8ca77c78951f865d1a0fabeb Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Wed, 11 Sep 2024 00:37:47 +0300 Subject: [PATCH 01/12] Switched swipe-to-reply processing on macOS from touch to scroll events. --- Telegram/SourceFiles/history/history_view_swipe.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/history/history_view_swipe.cpp b/Telegram/SourceFiles/history/history_view_swipe.cpp index 041664e87..cca7a4daa 100644 --- a/Telegram/SourceFiles/history/history_view_swipe.cpp +++ b/Telegram/SourceFiles/history/history_view_swipe.cpp @@ -191,7 +191,7 @@ void SetupSwipeHandler( const auto t = static_cast(e.get()); const auto touchscreen = t->device() && (t->device()->type() == base::TouchDevice::TouchScreen); - if (!Platform::IsMac() && !touchscreen) { + if (/*!Platform::IsMac() && */!touchscreen) { break; } else if (type == QEvent::TouchBegin) { // Reset state in case we lost some TouchEnd. @@ -235,6 +235,7 @@ void SetupSwipeHandler( case QEvent::Wheel: { const auto w = static_cast(e.get()); const auto phase = w->phase(); +#if 0 #ifdef Q_OS_MAC if (phase == Qt::ScrollBegin) { state->twoFingerScrollStarted = true; @@ -246,7 +247,8 @@ void SetupSwipeHandler( state->twoFingerScrollStarted = false; } #endif // Q_OS_MAC - if (Platform::IsMac() || phase == Qt::NoScrollPhase) { +#endif + if (/*Platform::IsMac() || */phase == Qt::NoScrollPhase) { break; } else if (phase == Qt::ScrollBegin) { // Reset state in case we lost some TouchEnd. From 6abce8d976800a2f6ca05c8151f7dff0698bbb1c Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Wed, 11 Sep 2024 12:42:26 +0300 Subject: [PATCH 02/12] Added attention style to menu item to delete all call logs. --- Telegram/SourceFiles/window/window_main_menu.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Telegram/SourceFiles/window/window_main_menu.cpp b/Telegram/SourceFiles/window/window_main_menu.cpp index 194d366c1..0d222894a 100644 --- a/Telegram/SourceFiles/window/window_main_menu.cpp +++ b/Telegram/SourceFiles/window/window_main_menu.cpp @@ -159,10 +159,12 @@ void ShowCallsBox(not_null window) { showSettings, &st::menuIconSettings); if (state->callsDelegate.peerListFullRowsCount() > 0) { - state->menu->addAction( - tr::lng_call_box_clear_all(tr::now), - clearAll, - &st::menuIconDelete); + Ui::Menu::CreateAddActionCallback(state->menu)({ + .text = tr::lng_call_box_clear_all(tr::now), + .handler = clearAll, + .icon = &st::menuIconDeleteAttention, + .isAttention = true, + }); } state->menu->popup(QCursor::pos()); return true; From 155305f0f74c7f697b255e01a4d5afcdde7c416b Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Wed, 11 Sep 2024 15:24:22 +0300 Subject: [PATCH 03/12] Added ability to generate QR code for self from settings. --- Telegram/SourceFiles/info/info.style | 13 +++++++++++++ Telegram/SourceFiles/info/info_wrap_widget.cpp | 18 ++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/Telegram/SourceFiles/info/info.style b/Telegram/SourceFiles/info/info.style index 3be1bd88a..65d6c2eb1 100644 --- a/Telegram/SourceFiles/info/info.style +++ b/Telegram/SourceFiles/info/info.style @@ -169,6 +169,13 @@ infoTopBarCall: IconButton(infoTopBarMenu) { iconPosition: point(5px, -1px); rippleAreaPosition: point(0px, 6px); } +infoTopBarQr: IconButton(infoTopBarMenu) { + width: 52px; + icon: icon {{ "menu/qr_code", boxTitleCloseFg }}; + iconOver: icon {{ "menu/qr_code", boxTitleCloseFgOver }}; + iconPosition: point(9px, -1px); + rippleAreaPosition: point(0px, 6px); +} infoTopBarForward: IconButton(infoTopBarBack) { width: 46px; icon: icon {{ "info/info_media_forward", boxTitleCloseFg }}; @@ -262,6 +269,12 @@ infoLayerTopBarCall: IconButton(infoLayerTopBarMenu) { iconOver: icon {{ "top_bar_call", boxTitleCloseFgOver }}; iconPosition: point(3px, -1px); } +infoLayerTopBarQr: IconButton(infoLayerTopBarClose) { + width: 40px; + icon: icon {{ "menu/qr_code", boxTitleCloseFg }}; + iconOver: icon {{ "menu/qr_code", boxTitleCloseFgOver }}; + iconPosition: point(8px, -1px); +} infoLayerTopBarForward: IconButton(infoLayerTopBarBack) { width: 45px; icon: icon {{ "info/info_media_forward", boxTitleCloseFg }}; diff --git a/Telegram/SourceFiles/info/info_wrap_widget.cpp b/Telegram/SourceFiles/info/info_wrap_widget.cpp index c97be9faf..b03dc2d97 100644 --- a/Telegram/SourceFiles/info/info_wrap_widget.cpp +++ b/Telegram/SourceFiles/info/info_wrap_widget.cpp @@ -16,6 +16,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "info/info_top_bar.h" #include "settings/cloud_password/settings_cloud_password_email_confirm.h" #include "settings/settings_chat.h" +#include "settings/settings_information.h" #include "settings/settings_main.h" #include "settings/settings_premium.h" #include "ui/effects/ripple_animation.h" // MaskByDrawer. @@ -35,6 +36,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "window/window_slide_animation.h" #include "boxes/peer_list_box.h" #include "ui/boxes/confirm_box.h" +#include "ui/boxes/peer_qr_box.h" #include "main/main_session.h" #include "mtproto/mtproto_config.h" #include "data/data_download_manager.h" @@ -384,6 +386,22 @@ void WrapWidget::setupTopBarMenuToggle() { addProfileCallsButton(); } else if (section.type() == Section::Type::Settings) { addTopBarMenuButton(); + if (section.settingsType() == ::Settings::Information::Id()) { + const auto controller = _controller->parentController(); + const auto self = controller->session().user(); + if (!self->username().isEmpty()) { + const auto show = controller->uiShow(); + const auto &st = (wrap() == Wrap::Layer) + ? st::infoLayerTopBarQr + : st::infoTopBarQr; + const auto button = _topBar->addButton( + base::make_unique_q(_topBar, st)); + button->addClickHandler([show, self] { + show->show( + Box(Ui::FillPeerQrBox, self, std::nullopt, nullptr)); + }); + } + } } else if (section.type() == Section::Type::Downloads) { auto &manager = Core::App().downloadManager(); rpl::merge( From 9a44ca2769fd8eca668f42999bcf0b2b4d0cd631 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Wed, 11 Sep 2024 16:31:46 +0300 Subject: [PATCH 04/12] Fixed display of message without text in section of shared links. --- Telegram/SourceFiles/data/data_media_types.cpp | 4 ++++ Telegram/SourceFiles/data/data_media_types.h | 2 ++ Telegram/SourceFiles/overview/overview_layout.cpp | 11 +++++++++++ 3 files changed, 17 insertions(+) diff --git a/Telegram/SourceFiles/data/data_media_types.cpp b/Telegram/SourceFiles/data/data_media_types.cpp index 2298ddcfb..79266a509 100644 --- a/Telegram/SourceFiles/data/data_media_types.cpp +++ b/Telegram/SourceFiles/data/data_media_types.cpp @@ -1726,6 +1726,10 @@ MediaWebPageFlags MediaWebPage::webpageFlags() const { return _flags; } +Storage::SharedMediaTypesMask MediaWebPage::sharedMediaTypes() const { + return Storage::SharedMediaType::Link; +} + bool MediaWebPage::hasReplyPreview() const { if (const auto document = MediaWebPage::document()) { return document->hasThumbnail() diff --git a/Telegram/SourceFiles/data/data_media_types.h b/Telegram/SourceFiles/data/data_media_types.h index b7be891bd..7bcaeb6fb 100644 --- a/Telegram/SourceFiles/data/data_media_types.h +++ b/Telegram/SourceFiles/data/data_media_types.h @@ -446,6 +446,8 @@ public: WebPageData *webpage() const override; MediaWebPageFlags webpageFlags() const override; + Storage::SharedMediaTypesMask sharedMediaTypes() const override; + bool hasReplyPreview() const override; Image *replyPreview() const override; bool replyPreviewLoaded() const override; diff --git a/Telegram/SourceFiles/overview/overview_layout.cpp b/Telegram/SourceFiles/overview/overview_layout.cpp index d8c70f1df..4357a17eb 100644 --- a/Telegram/SourceFiles/overview/overview_layout.cpp +++ b/Telegram/SourceFiles/overview/overview_layout.cpp @@ -1638,6 +1638,17 @@ Link::Link( } _links.push_back(LinkEntry(url, entityText)); } + if (_links.empty()) { + if (const auto media = parent->media()) { + if (const auto webpage = media->webpage()) { + if (!webpage->displayUrl.isEmpty() + && !webpage->url.isEmpty()) { + _links.push_back( + LinkEntry(webpage->displayUrl, webpage->url)); + } + } + } + } while (lnk > 0 && till > from) { --lnk; auto &entity = entities.at(lnk); From a5f1209f28920d2102e5929c0efc2ee756cfb5cc Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 12 Sep 2024 14:03:23 +0400 Subject: [PATCH 05/12] Remove redundant web apps code. --- .../inline_bots/bot_attach_web_view.h | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/Telegram/SourceFiles/inline_bots/bot_attach_web_view.h b/Telegram/SourceFiles/inline_bots/bot_attach_web_view.h index e9622fd02..4958ba19d 100644 --- a/Telegram/SourceFiles/inline_bots/bot_attach_web_view.h +++ b/Telegram/SourceFiles/inline_bots/bot_attach_web_view.h @@ -80,24 +80,6 @@ struct AttachWebViewBot { bool requestWriteAccess : 1 = false; }; -struct AddToMenuOpenAttach { - QString startCommand; - PeerTypes chooseTypes; -}; -struct AddToMenuOpenMenu { - QString startCommand; -}; -struct AddToMenuOpenApp { - not_null app; - QString startCommand; -}; -struct AddToMenuOpen : std::variant< - AddToMenuOpenAttach, - AddToMenuOpenMenu, - AddToMenuOpenApp> { - using variant::variant; -}; - struct WebViewSourceButton { bool simple = false; From d3bcf63cf79ba3e7851b1759c738f265773095bd Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 12 Sep 2024 14:07:27 +0400 Subject: [PATCH 06/12] Fix repeated request of channel difference. --- Telegram/SourceFiles/api/api_updates.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/api/api_updates.cpp b/Telegram/SourceFiles/api/api_updates.cpp index 25ee380f8..ae99d2954 100644 --- a/Telegram/SourceFiles/api/api_updates.cpp +++ b/Telegram/SourceFiles/api/api_updates.cpp @@ -655,6 +655,7 @@ void Updates::getDifferenceAfterFail() { wait = wait ? std::min(wait, i->second - now) : (i->second - now); ++i; } else { + i->first->ptsSetRequesting(false); getChannelDifference(i->first, ChannelDifferenceRequest::AfterFail); i = _whenGetDiffAfterFail.erase(i); } @@ -703,7 +704,9 @@ void Updates::getChannelDifference( _whenGetDiffByPts.remove(channel); } - if (!channel->ptsInited() || channel->ptsRequesting()) return; + if (!channel->ptsInited() || channel->ptsRequesting()) { + return; + } if (from != ChannelDifferenceRequest::AfterFail) { _whenGetDiffAfterFail.remove(channel); @@ -1554,6 +1557,7 @@ void Updates::feedUpdate(const MTPUpdate &update) { } if (channel && !_handlingChannelDifference) { if (channel->ptsRequesting()) { // skip global updates while getting channel difference + MTP_LOG(0, ("Skipping new channel message because getting the difference.")); return; } channel->ptsUpdateAndApply(d.vpts().v, d.vpts_count().v, update); @@ -1646,6 +1650,7 @@ void Updates::feedUpdate(const MTPUpdate &update) { if (channel && !_handlingChannelDifference) { if (channel->ptsRequesting()) { // skip global updates while getting channel difference + MTP_LOG(0, ("Skipping channel message edit because getting the difference.")); return; } else { channel->ptsUpdateAndApply(d.vpts().v, d.vpts_count().v, update); @@ -1661,6 +1666,7 @@ void Updates::feedUpdate(const MTPUpdate &update) { if (channel && !_handlingChannelDifference) { if (channel->ptsRequesting()) { // skip global updates while getting channel difference + MTP_LOG(0, ("Skipping pinned channel messages because getting the difference.")); return; } else { channel->ptsUpdateAndApply(d.vpts().v, d.vpts_count().v, update); @@ -1775,6 +1781,7 @@ void Updates::feedUpdate(const MTPUpdate &update) { if (channel && !_handlingChannelDifference) { if (channel->ptsRequesting()) { // skip global updates while getting channel difference + MTP_LOG(0, ("Skipping delete channel messages because getting the difference.")); return; } channel->ptsUpdateAndApply(d.vpts().v, d.vpts_count().v, update); @@ -1838,6 +1845,7 @@ void Updates::feedUpdate(const MTPUpdate &update) { auto channel = session().data().channelLoaded(d.vchannel_id()); if (channel && !_handlingChannelDifference) { if (channel->ptsRequesting()) { // skip global updates while getting channel difference + MTP_LOG(0, ("Skipping channel web page update because getting the difference.")); return; } else { channel->ptsUpdateAndApply(d.vpts().v, d.vpts_count().v, update); From 68454a984180d7db56ee3d3c6ea53f1dca1f018b Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Thu, 12 Sep 2024 04:23:55 +0400 Subject: [PATCH 07/12] Migrate almost all actions to latest OS versions --- .github/workflows/mac_packaged.yml | 17 ++++++++++++----- .github/workflows/snap.yml | 2 +- .github/workflows/win.yml | 2 +- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.github/workflows/mac_packaged.yml b/.github/workflows/mac_packaged.yml index bc9f5dd4a..7f2775eea 100644 --- a/.github/workflows/mac_packaged.yml +++ b/.github/workflows/mac_packaged.yml @@ -40,7 +40,7 @@ jobs: macos: name: MacOS - runs-on: macos-13 + runs-on: macos-latest strategy: matrix: @@ -49,7 +49,7 @@ jobs: env: GIT: "https://github.com" - CMAKE_PREFIX_PATH: "/usr/local/opt/ffmpeg@6:/usr/local/opt/openal-soft" + CMAKE_PREFIX_PATH: "/opt/homebrew/opt/ffmpeg@6:/opt/homebrew/opt/openal-soft" UPLOAD_ARTIFACT: "true" ONLY_CACHE: "false" MANUAL_CACHING: "1" @@ -69,7 +69,7 @@ jobs: run: | brew update brew upgrade || true - brew install ada-url autoconf automake boost cmake ffmpeg@6 openal-soft openh264 openssl opus ninja pkg-config python qt yasm xz + brew install ada-url autoconf automake boost cmake ffmpeg@6 libtool openal-soft openh264 openssl opus ninja pkg-config python qt yasm xz sudo xcode-select -s /Applications/Xcode.app/Contents/Developer xcodebuild -version > CACHE_KEY.txt @@ -95,7 +95,7 @@ jobs: ./autogen.sh ./configure --disable-examples --disable-doc make -j$(sysctl -n hw.logicalcpu) - make install + sudo make install - name: WebRTC cache. id: cache-webrtc @@ -111,7 +111,11 @@ jobs: git clone --depth=1 --recursive --shallow-submodules $GIT/desktop-app/tg_owt.git cd tg_owt - cmake -B build . -GNinja -DCMAKE_BUILD_TYPE=Debug + cmake -Bbuild -GNinja . \ + -DCMAKE_BUILD_TYPE=Debug \ + -DCMAKE_C_FLAGS_DEBUG="" \ + -DCMAKE_CXX_FLAGS_DEBUG="" + cmake --build build --parallel - name: Telegram Desktop build. @@ -132,6 +136,9 @@ jobs: cmake -Bbuild -GNinja . \ -DCMAKE_BUILD_TYPE=Debug \ + -DCMAKE_C_FLAGS_DEBUG="" \ + -DCMAKE_CXX_FLAGS_DEBUG="" \ + -DCMAKE_EXE_LINKER_FLAGS="-s" \ -DCMAKE_FIND_FRAMEWORK=LAST \ -DTDESKTOP_API_TEST=ON \ -DDESKTOP_APP_USE_PACKAGED_LAZY=ON \ diff --git a/.github/workflows/snap.yml b/.github/workflows/snap.yml index 93ef6ad36..2d7799983 100644 --- a/.github/workflows/snap.yml +++ b/.github/workflows/snap.yml @@ -40,7 +40,7 @@ jobs: snap: name: Ubuntu - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest env: UPLOAD_ARTIFACT: "true" diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index 6de53f12d..3a85c057d 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -42,7 +42,7 @@ jobs: windows: name: Windows - runs-on: windows-2022 + runs-on: windows-latest strategy: matrix: From fe7f4233b9d21c1de9da53464a5e912dc1243ad3 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Thu, 12 Sep 2024 06:44:31 +0400 Subject: [PATCH 08/12] Add missing ThirdParty cache to Windows action --- .github/workflows/win.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index 3a85c057d..d08d5824d 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -94,6 +94,14 @@ jobs: nuget sources Disable -Name "Microsoft Visual Studio Offline Packages" nuget sources Add -Source https://api.nuget.org/v3/index.json & exit 0 + - name: ThirdParty cache. + id: cache-third-party + uses: actions/cache@v4 + with: + path: ${{ env.TBUILD }}\ThirdParty + key: ${{ runner.OS }}-${{ matrix.arch }}-third-party-${{ env.CACHE_KEY }} + restore-keys: ${{ runner.OS }}-${{ matrix.arch }}-third-party- + - name: Libraries cache. id: cache-libs uses: actions/cache@v4 From bad2dc30c39a8b5911e5b142118c295fde2a0b07 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Thu, 12 Sep 2024 13:28:10 +0300 Subject: [PATCH 09/12] Added button to generate QR code for self to main section of settings. --- Telegram/SourceFiles/info/info_wrap_widget.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/info/info_wrap_widget.cpp b/Telegram/SourceFiles/info/info_wrap_widget.cpp index b03dc2d97..992f9f495 100644 --- a/Telegram/SourceFiles/info/info_wrap_widget.cpp +++ b/Telegram/SourceFiles/info/info_wrap_widget.cpp @@ -386,7 +386,8 @@ void WrapWidget::setupTopBarMenuToggle() { addProfileCallsButton(); } else if (section.type() == Section::Type::Settings) { addTopBarMenuButton(); - if (section.settingsType() == ::Settings::Information::Id()) { + if (section.settingsType() == ::Settings::Information::Id() + || section.settingsType() == ::Settings::Main::Id()) { const auto controller = _controller->parentController(); const auto self = controller->session().user(); if (!self->username().isEmpty()) { From 2c8c92c2a4985e71a8ded0841666c0c1af7b3605 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Thu, 12 Sep 2024 13:38:36 +0300 Subject: [PATCH 10/12] Slightly increased max width for username in QR code. --- Telegram/SourceFiles/ui/boxes/peer_qr_box.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Telegram/SourceFiles/ui/boxes/peer_qr_box.cpp b/Telegram/SourceFiles/ui/boxes/peer_qr_box.cpp index d35929871..dba8141c6 100644 --- a/Telegram/SourceFiles/ui/boxes/peer_qr_box.cpp +++ b/Telegram/SourceFiles/ui/boxes/peer_qr_box.cpp @@ -124,8 +124,9 @@ void Paint( const auto gradientRotation = int(angle / 45.) * 45; const auto gradientRotationAdd = angle - gradientRotation; + const auto textAdditionalWidth = backgroundMargins.left(); auto back = Images::GenerateGradient( - qrRect.size(), + qrRect.size() + QSize(textAdditionalWidth, 0), backgroundColors, gradientRotation, 1. - (gradientRotationAdd / 45.)); @@ -151,7 +152,7 @@ void Paint( p.drawImage(qrRect, qrImage); if (textMaxHeight) { p.drawImage( - qrRect.x(), + qrRect.x() - textAdditionalWidth / 2, rect::bottom(qrRect) + ((rect::bottom(roundedRect) - rect::bottom(qrRect)) - textMaxHeight) / 2, @@ -238,9 +239,9 @@ not_null PrepareQrWidget( aboutLabel->setText(about); aboutLabel->resizeToWidth(resultWidth); } - const auto qrWidth = state->qrImage.width() - / style::DevicePixelRatio(); - const auto lines = int(state->textWidth / qrWidth) + 1; + const auto textMaxWidth = state->backgroundMargins.left() + + (state->qrImage.width() / style::DevicePixelRatio()); + const auto lines = int(state->textWidth / textMaxWidth) + 1; state->textMaxHeight = state->textWidth ? (font->height * lines) : 0; const auto whiteMargins = RoundedMargins( state->backgroundMargins, @@ -792,8 +793,9 @@ void FillPeerQrBox( Qr::Redundancy::Default), introQrPixel, qrMaxSize); - const auto qrWidth = qrImage.width() / style::DevicePixelRatio(); - const auto lines = int(textWidth / qrWidth) + 1; + const auto textMaxWidth = backgroundMargins.left() + + (qrImage.width() / style::DevicePixelRatio()); + const auto lines = int(textWidth / textMaxWidth) + 1; const auto textMaxHeight = textWidth ? font->height * lines : 0; const auto whiteMargins = RoundedMargins( From 2383bf2c7114e18afade34e19e7f16031d44bafa Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Thu, 12 Sep 2024 13:39:13 +0300 Subject: [PATCH 11/12] Fit amount of available colors in box for share of QR code to 8. --- Telegram/SourceFiles/ui/boxes/peer_qr_box.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/Telegram/SourceFiles/ui/boxes/peer_qr_box.cpp b/Telegram/SourceFiles/ui/boxes/peer_qr_box.cpp index dba8141c6..7001e5151 100644 --- a/Telegram/SourceFiles/ui/boxes/peer_qr_box.cpp +++ b/Telegram/SourceFiles/ui/boxes/peer_qr_box.cpp @@ -487,14 +487,13 @@ void FillPeerQrBox( }) | ranges::views::filter([](const Colors &colors) { return !colors.empty(); }) | ranges::to_vector; - colorsCollection.insert( - colorsCollection.begin(), - Colors{ - st::premiumButtonBg1->c, - st::premiumButtonBg1->c, - st::premiumButtonBg2->c, - st::premiumButtonBg3->c, - }); + Expects(!colorsCollection.empty()); + colorsCollection[0] = Colors{ + st::premiumButtonBg1->c, + st::premiumButtonBg1->c, + st::premiumButtonBg2->c, + st::premiumButtonBg3->c, + }; // colorsCollection.push_back(Colors{ // st::creditsBg1->c, // st::creditsBg2->c, From ef98d4ece7c3198d668d48126edc91b60910974f Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 12 Sep 2024 14:41:33 +0400 Subject: [PATCH 12/12] Version 5.5.4. - Fix channel updates stopping after difference request failing. - Add QR code generation for your username in Settings. - Fix swipe-to-reply gestures stopping. (macOS) --- Telegram/Resources/uwp/AppX/AppxManifest.xml | 2 +- Telegram/Resources/winrc/Telegram.rc | 8 ++++---- Telegram/Resources/winrc/Updater.rc | 8 ++++---- Telegram/SourceFiles/core/version.h | 4 ++-- Telegram/build/version | 8 ++++---- changelog.txt | 6 ++++++ 6 files changed, 21 insertions(+), 15 deletions(-) diff --git a/Telegram/Resources/uwp/AppX/AppxManifest.xml b/Telegram/Resources/uwp/AppX/AppxManifest.xml index 313287557..dbaeaa5bf 100644 --- a/Telegram/Resources/uwp/AppX/AppxManifest.xml +++ b/Telegram/Resources/uwp/AppX/AppxManifest.xml @@ -10,7 +10,7 @@ + Version="5.5.4.0" /> Telegram Desktop Telegram Messenger LLP diff --git a/Telegram/Resources/winrc/Telegram.rc b/Telegram/Resources/winrc/Telegram.rc index 238b85155..04f7e2f6a 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,5,3,0 - PRODUCTVERSION 5,5,3,0 + FILEVERSION 5,5,4,0 + PRODUCTVERSION 5,5,4,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.5.3.0" + VALUE "FileVersion", "5.5.4.0" VALUE "LegalCopyright", "Copyright (C) 2014-2024" VALUE "ProductName", "Telegram Desktop" - VALUE "ProductVersion", "5.5.3.0" + VALUE "ProductVersion", "5.5.4.0" END END BLOCK "VarFileInfo" diff --git a/Telegram/Resources/winrc/Updater.rc b/Telegram/Resources/winrc/Updater.rc index 9869eedf3..fa36c34ff 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,5,3,0 - PRODUCTVERSION 5,5,3,0 + FILEVERSION 5,5,4,0 + PRODUCTVERSION 5,5,4,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.5.3.0" + VALUE "FileVersion", "5.5.4.0" VALUE "LegalCopyright", "Copyright (C) 2014-2024" VALUE "ProductName", "Telegram Desktop" - VALUE "ProductVersion", "5.5.3.0" + VALUE "ProductVersion", "5.5.4.0" END END BLOCK "VarFileInfo" diff --git a/Telegram/SourceFiles/core/version.h b/Telegram/SourceFiles/core/version.h index f6865881e..7f41fab91 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 = 5005003; -constexpr auto AppVersionStr = "5.5.3"; +constexpr auto AppVersion = 5005004; +constexpr auto AppVersionStr = "5.5.4"; constexpr auto AppBetaVersion = false; constexpr auto AppAlphaVersion = TDESKTOP_ALPHA_VERSION; diff --git a/Telegram/build/version b/Telegram/build/version index bc6ebdab7..69b99552b 100644 --- a/Telegram/build/version +++ b/Telegram/build/version @@ -1,7 +1,7 @@ -AppVersion 5005003 +AppVersion 5005004 AppVersionStrMajor 5.5 -AppVersionStrSmall 5.5.3 -AppVersionStr 5.5.3 +AppVersionStrSmall 5.5.4 +AppVersionStr 5.5.4 BetaChannel 0 AlphaVersion 0 -AppVersionOriginal 5.5.3 +AppVersionOriginal 5.5.4 diff --git a/changelog.txt b/changelog.txt index c5814f7a5..2bd1bca36 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,9 @@ +5.5.4 (12.09.24) + +- Fix channel updates stopping after difference request failing. +- Add QR code generation for your username in Settings. +- Fix swipe-to-reply gestures stopping. (macOS) + 5.5.3 (10.09.24) - Fix custom emoji sending.