mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-12 20:27:13 +02:00
Merge tag 'v5.5.4' into dev
# Conflicts: # .github/workflows/mac_packaged.yml # .github/workflows/snap.yml # Telegram/Resources/winrc/Telegram.rc # Telegram/Resources/winrc/Updater.rc # Telegram/SourceFiles/core/version.h
This commit is contained in:
commit
7caf421074
17 changed files with 114 additions and 56 deletions
10
.github/workflows/win.yml
vendored
10
.github/workflows/win.yml
vendored
|
@ -42,7 +42,7 @@ jobs:
|
|||
|
||||
windows:
|
||||
name: Windows
|
||||
runs-on: windows-2022
|
||||
runs-on: windows-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
|
@ -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
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<Identity Name="TelegramMessengerLLP.TelegramDesktop"
|
||||
ProcessorArchitecture="ARCHITECTURE"
|
||||
Publisher="CN=536BC709-8EE1-4478-AF22-F0F0F26FF64A"
|
||||
Version="5.5.3.0" />
|
||||
Version="5.5.4.0" />
|
||||
<Properties>
|
||||
<DisplayName>Telegram Desktop</DisplayName>
|
||||
<PublisherDisplayName>Telegram Messenger LLP</PublisherDisplayName>
|
||||
|
|
|
@ -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", "Radolyn Labs"
|
||||
VALUE "FileDescription", "AyuGram Desktop"
|
||||
VALUE "FileVersion", "5.5.3.0"
|
||||
VALUE "FileVersion", "5.5.4.0"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2014-2024"
|
||||
VALUE "ProductName", "AyuGram Desktop"
|
||||
VALUE "ProductVersion", "5.5.3.0"
|
||||
VALUE "ProductVersion", "5.5.4.0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
|
@ -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", "Radolyn Labs"
|
||||
VALUE "FileDescription", "AyuGram Desktop Updater"
|
||||
VALUE "FileVersion", "5.5.3.0"
|
||||
VALUE "FileVersion", "5.5.4.0"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2014-2024"
|
||||
VALUE "ProductName", "AyuGram Desktop"
|
||||
VALUE "ProductVersion", "5.5.3.0"
|
||||
VALUE "ProductVersion", "5.5.4.0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
|
@ -659,6 +659,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);
|
||||
}
|
||||
|
@ -707,7 +708,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);
|
||||
|
@ -1562,6 +1565,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);
|
||||
|
@ -1654,6 +1658,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);
|
||||
|
@ -1669,6 +1674,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);
|
||||
|
@ -1783,6 +1789,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);
|
||||
|
@ -1846,6 +1853,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);
|
||||
|
|
|
@ -22,7 +22,7 @@ constexpr auto AppId = "{53F49750-6209-4FBF-9CA8-7A333C87D666}"_cs;
|
|||
constexpr auto AppNameOld = "AyuGram for Windows"_cs;
|
||||
constexpr auto AppName = "AyuGram Desktop"_cs;
|
||||
constexpr auto AppFile = "AyuGram"_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;
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -191,7 +191,7 @@ void SetupSwipeHandler(
|
|||
const auto t = static_cast<QTouchEvent*>(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<QWheelEvent*>(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.
|
||||
|
|
|
@ -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 }};
|
||||
|
|
|
@ -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"
|
||||
|
@ -388,6 +390,23 @@ void WrapWidget::setupTopBarMenuToggle() {
|
|||
addProfileCallsButton();
|
||||
} else if (section.type() == Section::Type::Settings) {
|
||||
addTopBarMenuButton();
|
||||
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()) {
|
||||
const auto show = controller->uiShow();
|
||||
const auto &st = (wrap() == Wrap::Layer)
|
||||
? st::infoLayerTopBarQr
|
||||
: st::infoTopBarQr;
|
||||
const auto button = _topBar->addButton(
|
||||
base::make_unique_q<Ui::IconButton>(_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(
|
||||
|
|
|
@ -80,24 +80,6 @@ struct AttachWebViewBot {
|
|||
bool requestWriteAccess : 1 = false;
|
||||
};
|
||||
|
||||
struct AddToMenuOpenAttach {
|
||||
QString startCommand;
|
||||
PeerTypes chooseTypes;
|
||||
};
|
||||
struct AddToMenuOpenMenu {
|
||||
QString startCommand;
|
||||
};
|
||||
struct AddToMenuOpenApp {
|
||||
not_null<BotAppData*> app;
|
||||
QString startCommand;
|
||||
};
|
||||
struct AddToMenuOpen : std::variant<
|
||||
AddToMenuOpenAttach,
|
||||
AddToMenuOpenMenu,
|
||||
AddToMenuOpenApp> {
|
||||
using variant::variant;
|
||||
};
|
||||
|
||||
struct WebViewSourceButton {
|
||||
bool simple = false;
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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<Ui::RpWidget*> 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,
|
||||
|
@ -486,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,
|
||||
|
@ -792,8 +792,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(
|
||||
|
|
|
@ -169,10 +169,12 @@ void ShowCallsBox(not_null<Window::SessionController*> 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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Add table
Reference in a new issue