Merge remote-tracking branch 'tdesktop/dev' into dev
This commit is contained in:
commit
e97551e3a2
14 changed files with 64 additions and 49 deletions
|
|
@ -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.1.7.4" />
|
Version="2.1.8.0" />
|
||||||
<Properties>
|
<Properties>
|
||||||
<DisplayName>Telegram Desktop</DisplayName>
|
<DisplayName>Telegram Desktop</DisplayName>
|
||||||
<PublisherDisplayName>Telegram FZ-LLC</PublisherDisplayName>
|
<PublisherDisplayName>Telegram FZ-LLC</PublisherDisplayName>
|
||||||
|
|
|
||||||
|
|
@ -44,8 +44,8 @@ IDI_ICON1 ICON "..\\art\\icon256.ico"
|
||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION 2,1,7,4
|
FILEVERSION 2,1,8,0
|
||||||
PRODUCTVERSION 2,1,7,4
|
PRODUCTVERSION 2,1,8,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.1.7.4"
|
VALUE "FileVersion", "2.1.8.0"
|
||||||
VALUE "LegalCopyright", "Copyright (C) 2014-2020"
|
VALUE "LegalCopyright", "Copyright (C) 2014-2020"
|
||||||
VALUE "ProductName", "Telegram Desktop"
|
VALUE "ProductName", "Telegram Desktop"
|
||||||
VALUE "ProductVersion", "2.1.7.4"
|
VALUE "ProductVersion", "2.1.8.0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
|
|
||||||
|
|
@ -35,8 +35,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION 2,1,7,4
|
FILEVERSION 2,1,8,0
|
||||||
PRODUCTVERSION 2,1,7,4
|
PRODUCTVERSION 2,1,8,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.1.7.4"
|
VALUE "FileVersion", "2.1.8.0"
|
||||||
VALUE "LegalCopyright", "Copyright (C) 2014-2020"
|
VALUE "LegalCopyright", "Copyright (C) 2014-2020"
|
||||||
VALUE "ProductName", "Telegram Desktop"
|
VALUE "ProductName", "Telegram Desktop"
|
||||||
VALUE "ProductVersion", "2.1.7.4"
|
VALUE "ProductVersion", "2.1.8.0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
|
|
||||||
|
|
@ -354,6 +354,16 @@ bool ParticipantsAdditionalData::canRestrictUser(
|
||||||
Unexpected("Peer in ParticipantsAdditionalData::canRestrictUser.");
|
Unexpected("Peer in ParticipantsAdditionalData::canRestrictUser.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ParticipantsAdditionalData::canRemoveUser(
|
||||||
|
not_null<UserData*> user) const {
|
||||||
|
if (canRestrictUser(user)) {
|
||||||
|
return true;
|
||||||
|
} else if (const auto chat = _peer->asChat()) {
|
||||||
|
return chat->invitedByMe.contains(user);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
auto ParticipantsAdditionalData::adminRights(
|
auto ParticipantsAdditionalData::adminRights(
|
||||||
not_null<UserData*> user) const
|
not_null<UserData*> user) const
|
||||||
-> std::optional<MTPChatAdminRights> {
|
-> std::optional<MTPChatAdminRights> {
|
||||||
|
|
@ -1439,6 +1449,8 @@ base::unique_qptr<Ui::PopupMenu> ParticipantsBoxController::rowContextMenu(
|
||||||
tr::lng_context_restrict_user(tr::now),
|
tr::lng_context_restrict_user(tr::now),
|
||||||
crl::guard(this, [=] { showRestricted(user); }));
|
crl::guard(this, [=] { showRestricted(user); }));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if (_additional.canRemoveUser(user)) {
|
||||||
if (!_additional.isKicked(user)) {
|
if (!_additional.isKicked(user)) {
|
||||||
const auto isGroup = _peer->isChat() || _peer->isMegagroup();
|
const auto isGroup = _peer->isChat() || _peer->isMegagroup();
|
||||||
result->addAction(
|
result->addAction(
|
||||||
|
|
@ -1809,7 +1821,7 @@ auto ParticipantsBoxController::computeType(
|
||||||
: _additional.adminRights(user).has_value()
|
: _additional.adminRights(user).has_value()
|
||||||
? Rights::Admin
|
? Rights::Admin
|
||||||
: Rights::Normal;
|
: Rights::Normal;
|
||||||
result.canRemove = _additional.canRestrictUser(user);
|
result.canRemove = _additional.canRemoveUser(user);
|
||||||
if (const auto channel = _peer->asChannel()) {
|
if (const auto channel = _peer->asChannel()) {
|
||||||
result.adminRank = channel->adminRank(user);
|
result.adminRank = channel->adminRank(user);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -88,6 +88,7 @@ public:
|
||||||
[[nodiscard]] bool canEditAdmin(not_null<UserData*> user) const;
|
[[nodiscard]] bool canEditAdmin(not_null<UserData*> user) const;
|
||||||
[[nodiscard]] bool canAddOrEditAdmin(not_null<UserData*> user) const;
|
[[nodiscard]] bool canAddOrEditAdmin(not_null<UserData*> user) const;
|
||||||
[[nodiscard]] bool canRestrictUser(not_null<UserData*> user) const;
|
[[nodiscard]] bool canRestrictUser(not_null<UserData*> user) const;
|
||||||
|
[[nodiscard]] bool canRemoveUser(not_null<UserData*> user) const;
|
||||||
[[nodiscard]] std::optional<MTPChatAdminRights> adminRights(
|
[[nodiscard]] std::optional<MTPChatAdminRights> adminRights(
|
||||||
not_null<UserData*> user) const;
|
not_null<UserData*> user) const;
|
||||||
QString adminRank(not_null<UserData*> user) const;
|
QString adminRank(not_null<UserData*> user) const;
|
||||||
|
|
|
||||||
|
|
@ -18,30 +18,6 @@ namespace {
|
||||||
|
|
||||||
std::map<int, const char*> BetaLogs() {
|
std::map<int, const char*> BetaLogs() {
|
||||||
return {
|
return {
|
||||||
{
|
|
||||||
1009010,
|
|
||||||
"\xE2\x80\xA2 Switch to the Picture-in-Picture mode "
|
|
||||||
"to watch your video in a small window.\n"
|
|
||||||
|
|
||||||
"\xE2\x80\xA2 Change video playback speed "
|
|
||||||
"in the playback controls '...' menu.\n"
|
|
||||||
|
|
||||||
"\xE2\x80\xA2 Rotate photos and videos in the media viewer "
|
|
||||||
"using the rotate button in the bottom right corner.\n"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
1009015,
|
|
||||||
"\xE2\x80\xA2 Mark new messages as read "
|
|
||||||
"while scrolling down through them.\n"
|
|
||||||
|
|
||||||
"\xE2\x80\xA2 Bug fixes and other minor improvements."
|
|
||||||
},
|
|
||||||
{
|
|
||||||
1009017,
|
|
||||||
"\xE2\x80\xA2 Spell checker on Windows 7.\n"
|
|
||||||
|
|
||||||
"\xE2\x80\xA2 Bug fixes and other minor improvements."
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
1009020,
|
1009020,
|
||||||
"\xE2\x80\xA2 Fix crash in shared links search.\n"
|
"\xE2\x80\xA2 Fix crash in shared links search.\n"
|
||||||
|
|
@ -63,6 +39,13 @@ std::map<int, const char*> BetaLogs() {
|
||||||
"was added to archive.\n"
|
"was added to archive.\n"
|
||||||
|
|
||||||
"\xE2\x80\xA2 Fix font issues in Linux version."
|
"\xE2\x80\xA2 Fix font issues in Linux version."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
2001008,
|
||||||
|
"\xE2\x80\xA2 Add support for full group message history export.\n"
|
||||||
|
|
||||||
|
"\xE2\x80\xA2 Allow export of a single chat message history "
|
||||||
|
"in JSON format."
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -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 = 2001007;
|
constexpr auto AppVersion = 2001008;
|
||||||
constexpr auto AppVersionStr = "2.1.7";
|
constexpr auto AppVersionStr = "2.1.8";
|
||||||
constexpr auto AppBetaVersion = true;
|
constexpr auto AppBetaVersion = true;
|
||||||
constexpr auto AppAlphaVersion = TDESKTOP_ALPHA_VERSION;
|
constexpr auto AppAlphaVersion = TDESKTOP_ALPHA_VERSION;
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,12 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
|
|
||||||
namespace Data {
|
namespace Data {
|
||||||
|
|
||||||
|
CloudFile::~CloudFile() {
|
||||||
|
// Destroy loader with still alive CloudFile with already zero '.loader'.
|
||||||
|
// Otherwise in ~FileLoader it tries to clear file.loader and crashes.
|
||||||
|
base::take(loader);
|
||||||
|
}
|
||||||
|
|
||||||
void CloudImageView::set(
|
void CloudImageView::set(
|
||||||
not_null<Main::Session*> session,
|
not_null<Main::Session*> session,
|
||||||
QImage image) {
|
QImage image) {
|
||||||
|
|
@ -224,7 +230,8 @@ void LoadCloudFile(
|
||||||
}
|
}
|
||||||
// NB! file.loader may be in ~FileLoader() already.
|
// NB! file.loader may be in ~FileLoader() already.
|
||||||
if (const auto loader = base::take(file.loader)) {
|
if (const auto loader = base::take(file.loader)) {
|
||||||
if (file.flags & CloudFile::Flag::Cancelled) {
|
if ((file.flags & CloudFile::Flag::Cancelled)
|
||||||
|
&& !loader->cancelled()) {
|
||||||
loader->cancel();
|
loader->cancel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,8 @@ struct CloudFile final {
|
||||||
};
|
};
|
||||||
friend inline constexpr bool is_flag_type(Flag) { return true; };
|
friend inline constexpr bool is_flag_type(Flag) { return true; };
|
||||||
|
|
||||||
|
~CloudFile();
|
||||||
|
|
||||||
ImageLocation location;
|
ImageLocation location;
|
||||||
std::unique_ptr<FileLoader> loader;
|
std::unique_ptr<FileLoader> loader;
|
||||||
int byteSize = 0;
|
int byteSize = 0;
|
||||||
|
|
|
||||||
|
|
@ -1433,6 +1433,11 @@ Link::Link(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const auto createHandler = [](const QString &url) {
|
||||||
|
return UrlClickHandler::IsSuspicious(url)
|
||||||
|
? std::make_shared<HiddenUrlClickHandler>(url)
|
||||||
|
: std::make_shared<UrlClickHandler>(url);
|
||||||
|
};
|
||||||
_page = media ? media->webpage() : nullptr;
|
_page = media ? media->webpage() : nullptr;
|
||||||
if (_page) {
|
if (_page) {
|
||||||
mainUrl = _page->url;
|
mainUrl = _page->url;
|
||||||
|
|
@ -1442,7 +1447,7 @@ Link::Link(
|
||||||
parent->fullId());
|
parent->fullId());
|
||||||
} else if (_page->photo) {
|
} else if (_page->photo) {
|
||||||
if (_page->type == WebPageType::Profile || _page->type == WebPageType::Video) {
|
if (_page->type == WebPageType::Profile || _page->type == WebPageType::Video) {
|
||||||
_photol = std::make_shared<UrlClickHandler>(_page->url);
|
_photol = createHandler(_page->url);
|
||||||
} else if (_page->type == WebPageType::Photo
|
} else if (_page->type == WebPageType::Photo
|
||||||
|| _page->siteName == qstr("Twitter")
|
|| _page->siteName == qstr("Twitter")
|
||||||
|| _page->siteName == qstr("Facebook")) {
|
|| _page->siteName == qstr("Facebook")) {
|
||||||
|
|
@ -1450,13 +1455,13 @@ Link::Link(
|
||||||
_page->photo,
|
_page->photo,
|
||||||
parent->fullId());
|
parent->fullId());
|
||||||
} else {
|
} else {
|
||||||
_photol = std::make_shared<UrlClickHandler>(_page->url);
|
_photol = createHandler(_page->url);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
_photol = std::make_shared<UrlClickHandler>(_page->url);
|
_photol = createHandler(_page->url);
|
||||||
}
|
}
|
||||||
} else if (!mainUrl.isEmpty()) {
|
} else if (!mainUrl.isEmpty()) {
|
||||||
_photol = std::make_shared<UrlClickHandler>(mainUrl);
|
_photol = createHandler(mainUrl);
|
||||||
}
|
}
|
||||||
if (from >= till && _page) {
|
if (from >= till && _page) {
|
||||||
text = _page->description.text;
|
text = _page->description.text;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
AppVersion 2001007
|
AppVersion 2001008
|
||||||
AppVersionStrMajor 2.1
|
AppVersionStrMajor 2.1
|
||||||
AppVersionStrSmall 2.1.7
|
AppVersionStrSmall 2.1.8
|
||||||
AppVersionStr 2.1.7
|
AppVersionStr 2.1.8
|
||||||
BetaChannel 0
|
BetaChannel 1
|
||||||
AlphaVersion 2001007004
|
AlphaVersion 0
|
||||||
AppVersionOriginal 2.1.7.4
|
AppVersionOriginal 2.1.8.beta
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit 019bb19f0923af2e8c7e0cd1abc2b8d9264afb7c
|
Subproject commit 48865e514979b4e2610fe6ca22bbb145bcfab4ea
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit bb182bbf5d66921cfcd182643d7e156e19d1884a
|
Subproject commit a32ee9581d33f684e80a0b92e1cb29c748f091a1
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
2.1.8 beta (03.06.20)
|
||||||
|
|
||||||
|
- Add support for full group message history export.
|
||||||
|
- Allow export of a single chat message history in JSON format.
|
||||||
|
|
||||||
2.1.7 (24.05.20)
|
2.1.7 (24.05.20)
|
||||||
|
|
||||||
- Fix the Fcitx input method plugin.
|
- Fix the Fcitx input method plugin.
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue