2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-02 15:45:12 +00:00

Updated TDesktop sources to 2.8.11

This commit is contained in:
RadRussianRus
2021-07-18 23:19:37 +03:00
22 changed files with 81 additions and 54 deletions

View File

@@ -9,7 +9,7 @@
<Identity Name="TelegramMessengerLLP.TelegramDesktop" <Identity Name="TelegramMessengerLLP.TelegramDesktop"
ProcessorArchitecture="ARCHITECTURE" ProcessorArchitecture="ARCHITECTURE"
Publisher="CN=536BC709-8EE1-4478-AF22-F0F0F26FF64A" Publisher="CN=536BC709-8EE1-4478-AF22-F0F0F26FF64A"
Version="2.8.8.0" /> Version="2.8.11.0" />
<Properties> <Properties>
<DisplayName>Telegram Desktop</DisplayName> <DisplayName>Telegram Desktop</DisplayName>
<PublisherDisplayName>Telegram Messenger LLP</PublisherDisplayName> <PublisherDisplayName>Telegram Messenger LLP</PublisherDisplayName>

View File

@@ -44,8 +44,8 @@ IDI_ICON1 ICON "..\\art\\icon256.ico"
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 2,8,8,0 FILEVERSION 2,8,11,0
PRODUCTVERSION 2,8,8,0 PRODUCTVERSION 2,8,11,0
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@@ -62,10 +62,10 @@ BEGIN
BEGIN BEGIN
VALUE "CompanyName", "Telegram FZ-LLC" VALUE "CompanyName", "Telegram FZ-LLC"
VALUE "FileDescription", "Telegram Desktop" VALUE "FileDescription", "Telegram Desktop"
VALUE "FileVersion", "2.8.8.0" VALUE "FileVersion", "2.8.11.0"
VALUE "LegalCopyright", "Copyright (C) 2014-2021" VALUE "LegalCopyright", "Copyright (C) 2014-2021"
VALUE "ProductName", "Telegram Desktop" VALUE "ProductName", "Telegram Desktop"
VALUE "ProductVersion", "2.8.8.0" VALUE "ProductVersion", "2.8.11.0"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"

View File

@@ -35,8 +35,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 2,8,8,0 FILEVERSION 2,8,11,0
PRODUCTVERSION 2,8,8,0 PRODUCTVERSION 2,8,11,0
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@@ -53,10 +53,10 @@ BEGIN
BEGIN BEGIN
VALUE "CompanyName", "Telegram FZ-LLC" VALUE "CompanyName", "Telegram FZ-LLC"
VALUE "FileDescription", "Telegram Desktop Updater" VALUE "FileDescription", "Telegram Desktop Updater"
VALUE "FileVersion", "2.8.8.0" VALUE "FileVersion", "2.8.11.0"
VALUE "LegalCopyright", "Copyright (C) 2014-2021" VALUE "LegalCopyright", "Copyright (C) 2014-2021"
VALUE "ProductName", "Telegram Desktop" VALUE "ProductName", "Telegram Desktop"
VALUE "ProductVersion", "2.8.8.0" VALUE "ProductVersion", "2.8.11.0"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"

View File

@@ -309,9 +309,9 @@ void FilterChatsPreview::paintEvent(QPaintEvent *e) {
} }
if (user->isBot()) { if (user->isBot()) {
statuses << tr::lng_status_bot(tr::now); statuses << tr::lng_status_bot(tr::now);
} else if (flags & MTPDuser::Flag::f_mutual_contact) { } else if (flags & UserDataFlag::MutualContact) {
statuses << tr::ktg_status_mutual_contact(tr::now); statuses << tr::ktg_status_mutual_contact(tr::now);
} else if (flags & MTPDuser::Flag::f_contact) { } else if (flags & UserDataFlag::Contact) {
statuses << tr::ktg_status_contact(tr::now); statuses << tr::ktg_status_contact(tr::now);
} else { } else {
statuses << tr::ktg_status_non_contact(tr::now); statuses << tr::ktg_status_non_contact(tr::now);

View File

@@ -186,16 +186,16 @@ auto Dependencies(ChatRestrictions)
{ Flag::EmbedLinks, Flag::SendMessages }, { Flag::EmbedLinks, Flag::SendMessages },
// send_games -> send_messages // send_games -> send_messages
{ Flag::SendGames, Flag::f_send_messages }, { Flag::SendGames, Flag::SendMessages },
// send_gifs -> send_messages // send_gifs -> send_messages
{ Flag::SendGifs, Flag::f_send_messages }, { Flag::SendGifs, Flag::SendMessages },
// send_inline -> send_messages // send_inline -> send_messages
{ Flag::SendInline, Flag::f_send_messages }, { Flag::SendInline, Flag::SendMessages },
// send_stickers -> send_messages // send_stickers -> send_messages
{ Flag::SendStickers, Flag::f_send_messages }, { Flag::SendStickers, Flag::SendMessages },
// send_media -> send_messages // send_media -> send_messages
{ Flag::SendMedia, Flag::SendMessages }, { Flag::SendMedia, Flag::SendMessages },

View File

@@ -388,7 +388,7 @@ bool StickerSetBox::showMenu(not_null<Ui::IconButton*> button) {
if (!_inner->notInstalled()) { if (!_inner->notInstalled()) {
const auto archive = [=] { const auto archive = [=] {
archiveStickers(); _inner->archiveStickers();
closeBox(); closeBox();
}; };
_menu->addAction(tr::lng_stickers_archive_pack(tr::now), archive); _menu->addAction(tr::lng_stickers_archive_pack(tr::now), archive);

View File

@@ -23,7 +23,7 @@ constexpr auto AppId = "{C4A4AE8F-B9F7-4CC7-8A6C-BF7EEE87ACA5}"_cs;
constexpr auto AppNameOld = "Telegram Win (Unofficial)"_cs; constexpr auto AppNameOld = "Telegram Win (Unofficial)"_cs;
constexpr auto AppName = "Kotatogram Desktop"_cs; constexpr auto AppName = "Kotatogram Desktop"_cs;
constexpr auto AppFile = "Kotatogram"_cs; constexpr auto AppFile = "Kotatogram"_cs;
constexpr auto AppVersion = 2008008; constexpr auto AppVersion = 2008011;
constexpr auto AppVersionStr = "2.8.8"; constexpr auto AppVersionStr = "2.8.11";
constexpr auto AppBetaVersion = false; constexpr auto AppBetaVersion = false;
constexpr auto AppAlphaVersion = TDESKTOP_ALPHA_VERSION; constexpr auto AppAlphaVersion = TDESKTOP_ALPHA_VERSION;

View File

@@ -1097,9 +1097,9 @@ std::vector<ChatRestrictions> ListOfRestrictions() {
return { return {
Flag::SendMessages, Flag::SendMessages,
Flag::SendMedia, Flag::SendMedia,
Flag::SendStickers Flag::SendStickers,
Flag::SendGifs Flag::SendGifs,
Flag::SendGames Flag::SendGames,
Flag::SendInline, Flag::SendInline,
Flag::EmbedLinks, Flag::EmbedLinks,
Flag::SendPolls, Flag::SendPolls,

View File

@@ -1383,7 +1383,7 @@ void InnerWidget::suggestRestrictUser(not_null<UserData*> user) {
_menu->addAction(tr::lng_context_remove_from_group(tr::now), [=] { _menu->addAction(tr::lng_context_remove_from_group(tr::now), [=] {
const auto text = tr::lng_profile_sure_kick(tr::now, lt_user, user->firstName); const auto text = tr::lng_profile_sure_kick(tr::now, lt_user, user->firstName);
auto editRestrictions = [=](bool hasAdminRights, const MTPChatBannedRights &currentRights) { auto editRestrictions = [=](bool hasAdminRights, ChatRestrictionsInfo currentRights) {
auto weak = QPointer<InnerWidget>(this); auto weak = QPointer<InnerWidget>(this);
auto weakBox = std::make_shared<QPointer<ConfirmBox>>(); auto weakBox = std::make_shared<QPointer<ConfirmBox>>();
auto box = Box<ConfirmBox>( auto box = Box<ConfirmBox>(
@@ -1393,7 +1393,7 @@ void InnerWidget::suggestRestrictUser(not_null<UserData*> user) {
if (weak) { if (weak) {
weak->restrictUser(user, weak->restrictUser(user,
currentRights, currentRights,
ChannelData::KickedRestrictedRights(user)); ChatRestrictionsInfo());
} }
if (*weakBox) { if (*weakBox) {
(*weakBox)->closeBox(); (*weakBox)->closeBox();
@@ -1404,7 +1404,7 @@ void InnerWidget::suggestRestrictUser(not_null<UserData*> user) {
Ui::LayerOption::KeepOther); Ui::LayerOption::KeepOther);
}; };
if (base::contains(_admins, user)) { if (base::contains(_admins, user)) {
editRestrictions(true, ChannelData::EmptyRestrictedRights(user)); editRestrictions(true, ChatRestrictionsInfo());
} else { } else {
_api.request(MTPchannels_GetParticipant( _api.request(MTPchannels_GetParticipant(
_channel->inputChannel, _channel->inputChannel,
@@ -1417,15 +1417,15 @@ void InnerWidget::suggestRestrictUser(not_null<UserData*> user) {
auto type = participant.vparticipant().type(); auto type = participant.vparticipant().type();
if (type == mtpc_channelParticipantBanned) { if (type == mtpc_channelParticipantBanned) {
auto &banned = participant.vparticipant().c_channelParticipantBanned(); auto &banned = participant.vparticipant().c_channelParticipantBanned();
editRestrictions(false, banned.vbanned_rights()); editRestrictions(false, ChatRestrictionsInfo(banned.vbanned_rights()));
} else { } else {
auto hasAdminRights = (type == mtpc_channelParticipantAdmin) auto hasAdminRights = (type == mtpc_channelParticipantAdmin)
|| (type == mtpc_channelParticipantCreator); || (type == mtpc_channelParticipantCreator);
auto bannedRights = ChannelData::EmptyRestrictedRights(user); auto bannedRights = ChatRestrictionsInfo();
editRestrictions(hasAdminRights, bannedRights); editRestrictions(hasAdminRights, bannedRights);
} }
}).fail([=](const MTP::Error &error) { }).fail([=](const MTP::Error &error) {
auto bannedRights = ChannelData::EmptyRestrictedRights(user); auto bannedRights = ChatRestrictionsInfo();
editRestrictions(false, bannedRights); editRestrictions(false, bannedRights);
}).send(); }).send();
} }

View File

@@ -3556,7 +3556,7 @@ bool HistoryWidget::hasDiscussionGroup() const {
const auto channel = _peer ? _peer->asChannel() : nullptr; const auto channel = _peer ? _peer->asChannel() : nullptr;
return channel return channel
&& channel->isBroadcast() && channel->isBroadcast()
&& (channel->flags() & MTPDchannel::Flag::f_has_link); && (channel->flags() & ChannelDataFlag::HasLink);
} }
void HistoryWidget::reportSelectedMessages() { void HistoryWidget::reportSelectedMessages() {

View File

@@ -709,12 +709,6 @@ void MainWindow::updateTrayMenu() {
} }
_updateTrayMenuTextActions.fire({}); _updateTrayMenuTextActions.fire({});
auto soundAction = actions.at(2);
auto soundActionText = Core::App().settings().soundNotify()
? tr::ktg_settings_disable_sound_from_tray(tr::now)
: tr::ktg_settings_enable_sound_from_tray(tr::now);
soundAction->setText(soundActionText);
psTrayMenuUpdated(); psTrayMenuUpdated();
} }

View File

@@ -19,6 +19,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
namespace MTP { namespace MTP {
namespace { namespace {
constexpr auto kVersion = 2;
using namespace details; using namespace details;
struct BuiltInDc { struct BuiltInDc {
@@ -437,8 +439,6 @@ QByteArray DcOptions::serialize() const {
} }
} }
constexpr auto kVersion = 1;
auto result = QByteArray(); auto result = QByteArray();
result.reserve(size); result.reserve(size);
{ {
@@ -541,7 +541,7 @@ bool DcOptions::constructFromSerialized(const QByteArray &serialized) {
} }
// Read CDN config // Read CDN config
if (!stream.atEnd()) { if (!stream.atEnd() && version > 1) {
auto count = qint32(0); auto count = qint32(0);
stream >> count; stream >> count;
if (stream.status() != QDataStream::Ok) { if (stream.status() != QDataStream::Ok) {

View File

@@ -386,10 +386,10 @@ void MainWindow::updateIconCounters() {
// Force Qt to use right icon size, not the larger one. // Force Qt to use right icon size, not the larger one.
QIcon forTrayIcon; QIcon forTrayIcon;
auto forTrayIcon16 = cDisableTrayCounter() auto forTrayIcon16 = cDisableTrayCounter()
? App::pixmapFromImageInPlace(iconWithCounter(16, 0, bg, fg, true)) ? Ui::PixmapFromImage(iconWithCounter(16, 0, bg, fg, true))
: iconSmallPixmap16; : iconSmallPixmap16;
auto forTrayIcon32 = cDisableTrayCounter() auto forTrayIcon32 = cDisableTrayCounter()
? App::pixmapFromImageInPlace(iconWithCounter(32, 0, bg, fg, true)) ? Ui::PixmapFromImage(iconWithCounter(32, 0, bg, fg, true))
: iconSmallPixmap32; : iconSmallPixmap32;
forTrayIcon.addPixmap(iconSizeSmall.width() >= 20 ? forTrayIcon32 : forTrayIcon16); forTrayIcon.addPixmap(iconSizeSmall.width() >= 20 ? forTrayIcon32 : forTrayIcon16);
trayIcon->setIcon(forTrayIcon); trayIcon->setIcon(forTrayIcon);

View File

@@ -21,6 +21,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "media/streaming/media_streaming_instance.h" #include "media/streaming/media_streaming_instance.h"
#include "media/streaming/media_streaming_loader_local.h" #include "media/streaming/media_streaming_loader_local.h"
#include "media/streaming/media_streaming_player.h" #include "media/streaming/media_streaming_player.h"
#include "styles/style_boxes.h"
namespace Ui { namespace Ui {
namespace { namespace {
@@ -87,7 +88,23 @@ ItemSingleMediaPreview::ItemSingleMediaPreview(
session->downloaderTaskFinished() session->downloaderTaskFinished()
) | rpl::start_with_next([=] { ) | rpl::start_with_next([=] {
const auto computed = computeThumbInfo(); const auto computed = computeThumbInfo();
if (computed.loaded) { if (!computed.image) {
if (_documentMedia && !_documentMedia->owner()->hasThumbnail()) {
const auto size = _documentMedia->owner()->dimensions.scaled(
st::sendMediaPreviewSize,
st::confirmMaxHeight,
Qt::KeepAspectRatio);
if (!size.isEmpty()) {
auto empty = QImage(
size,
QImage::Format_ARGB32_Premultiplied);
empty.fill(Qt::black);
preparePreview(empty);
}
_lifetimeDownload.destroy();
}
return;
} else if (computed.loaded) {
_lifetimeDownload.destroy(); _lifetimeDownload.destroy();
} }
preparePreview(computed.image->original()); preparePreview(computed.image->original());

View File

@@ -29,8 +29,10 @@ ENV LibrariesPath /usr/src/Libraries
WORKDIR $LibrariesPath WORKDIR $LibrariesPath
FROM builder AS patches FROM builder AS patches
ADD https://api.github.com/repos/desktop-app/patches/git/refs/heads/master patches-version.json RUN git clone $GIT/desktop-app/patches.git
RUN git clone --depth=1 $GIT/desktop-app/patches.git
WORKDIR patches
RUN git checkout 87a2e9ee07
FROM builder AS extra-cmake-modules FROM builder AS extra-cmake-modules

View File

@@ -1,7 +1,7 @@
AppVersion 2008008 AppVersion 2008011
AppVersionStrMajor 2.8 AppVersionStrMajor 2.8
AppVersionStrSmall 2.8.8 AppVersionStrSmall 2.8.11
AppVersionStr 2.8.8 AppVersionStr 2.8.11
BetaChannel 0 BetaChannel 0
AlphaVersion 0 AlphaVersion 0
AppVersionOriginal 2.8.8 AppVersionOriginal 2.8.11

View File

@@ -1,3 +1,17 @@
2.8.11 (17.07.21)
- Check shader compilation / linking before using ANGLE.
2.8.10 (16.07.21)
- Fix media loading.
2.8.9 (16.07.21)
- Fix GIF caption edit.
- Fix version on Windows without SetDefaultDllDirectories.
- Fix fonts on Linux.
2.8.8 (15.07.21) 2.8.8 (15.07.21)
- Added an image editor. Crop photos or highlight parts of screenshots before sending. - Added an image editor. Crop photos or highlight parts of screenshots before sending.

View File

@@ -34,7 +34,7 @@ Open **x64 Native Tools Command Prompt for VS 2019.bat**, go to ***BuildPath***
cd ThirdParty cd ThirdParty
git clone https://github.com/desktop-app/patches.git git clone https://github.com/desktop-app/patches.git
cd patches cd patches
git checkout 4409bae git checkout 87a2e9ee07
cd ../ cd ../
git clone https://chromium.googlesource.com/external/gyp git clone https://chromium.googlesource.com/external/gyp
cd gyp cd gyp
@@ -55,7 +55,7 @@ Open **x64 Native Tools Command Prompt for VS 2019.bat**, go to ***BuildPath***
git clone https://github.com/desktop-app/patches.git git clone https://github.com/desktop-app/patches.git
cd patches cd patches
git checkout 4409bae git checkout 87a2e9ee07
cd .. cd ..
git clone https://github.com/desktop-app/lzma.git git clone https://github.com/desktop-app/lzma.git

View File

@@ -34,7 +34,7 @@ Open **x86 Native Tools Command Prompt for VS 2019.bat**, go to ***BuildPath***
cd ThirdParty cd ThirdParty
git clone https://github.com/desktop-app/patches.git git clone https://github.com/desktop-app/patches.git
cd patches cd patches
git checkout 4409bae git checkout 87a2e9ee07
cd ../ cd ../
git clone https://chromium.googlesource.com/external/gyp git clone https://chromium.googlesource.com/external/gyp
cd gyp cd gyp
@@ -55,7 +55,7 @@ Open **x86 Native Tools Command Prompt for VS 2019.bat**, go to ***BuildPath***
git clone https://github.com/desktop-app/patches.git git clone https://github.com/desktop-app/patches.git
cd patches cd patches
git checkout 4409bae git checkout 87a2e9ee07
cd .. cd ..
git clone https://github.com/desktop-app/lzma.git git clone https://github.com/desktop-app/lzma.git

View File

@@ -29,7 +29,7 @@ Go to ***BuildPath*** and run
git clone https://github.com/desktop-app/patches.git git clone https://github.com/desktop-app/patches.git
cd patches cd patches
git checkout 51a9fc5 git checkout 87a2e9ee07
cd ../ cd ../
git clone https://chromium.googlesource.com/external/gyp git clone https://chromium.googlesource.com/external/gyp
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
@@ -58,7 +58,7 @@ Go to ***BuildPath*** and run
git clone https://github.com/desktop-app/patches.git git clone https://github.com/desktop-app/patches.git
cd patches cd patches
git checkout 51a9fc5 git checkout 87a2e9ee07
cd .. cd ..
git clone https://git.tukaani.org/xz.git git clone https://git.tukaani.org/xz.git