diff --git a/Telegram/Resources/uwp/AppX/AppxManifest.xml b/Telegram/Resources/uwp/AppX/AppxManifest.xml index 314e26dbc..2261e12d6 100644 --- a/Telegram/Resources/uwp/AppX/AppxManifest.xml +++ b/Telegram/Resources/uwp/AppX/AppxManifest.xml @@ -9,7 +9,7 @@ + Version="2.1.8.0" /> Telegram Desktop Telegram FZ-LLC diff --git a/Telegram/Resources/winrc/Telegram.rc b/Telegram/Resources/winrc/Telegram.rc index 7e097b1e3..31ea6cb6f 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 2,1,7,4 - PRODUCTVERSION 2,1,7,4 + FILEVERSION 2,1,8,0 + PRODUCTVERSION 2,1,8,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -62,10 +62,10 @@ BEGIN BEGIN VALUE "CompanyName", "Telegram FZ-LLC" VALUE "FileDescription", "Telegram Desktop" - VALUE "FileVersion", "2.1.7.4" + VALUE "FileVersion", "2.1.8.0" VALUE "LegalCopyright", "Copyright (C) 2014-2020" VALUE "ProductName", "Telegram Desktop" - VALUE "ProductVersion", "2.1.7.4" + VALUE "ProductVersion", "2.1.8.0" END END BLOCK "VarFileInfo" diff --git a/Telegram/Resources/winrc/Updater.rc b/Telegram/Resources/winrc/Updater.rc index e3c4bb9b3..aef821f64 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 2,1,7,4 - PRODUCTVERSION 2,1,7,4 + FILEVERSION 2,1,8,0 + PRODUCTVERSION 2,1,8,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", "2.1.7.4" + VALUE "FileVersion", "2.1.8.0" VALUE "LegalCopyright", "Copyright (C) 2014-2020" VALUE "ProductName", "Telegram Desktop" - VALUE "ProductVersion", "2.1.7.4" + VALUE "ProductVersion", "2.1.8.0" END END BLOCK "VarFileInfo" diff --git a/Telegram/SourceFiles/boxes/peers/edit_participants_box.cpp b/Telegram/SourceFiles/boxes/peers/edit_participants_box.cpp index 0c0b31aa1..5dbf6a7f3 100644 --- a/Telegram/SourceFiles/boxes/peers/edit_participants_box.cpp +++ b/Telegram/SourceFiles/boxes/peers/edit_participants_box.cpp @@ -354,6 +354,16 @@ bool ParticipantsAdditionalData::canRestrictUser( Unexpected("Peer in ParticipantsAdditionalData::canRestrictUser."); } +bool ParticipantsAdditionalData::canRemoveUser( + not_null user) const { + if (canRestrictUser(user)) { + return true; + } else if (const auto chat = _peer->asChat()) { + return chat->invitedByMe.contains(user); + } + return false; +} + auto ParticipantsAdditionalData::adminRights( not_null user) const -> std::optional { @@ -1439,6 +1449,8 @@ base::unique_qptr ParticipantsBoxController::rowContextMenu( tr::lng_context_restrict_user(tr::now), crl::guard(this, [=] { showRestricted(user); })); } + } + if (_additional.canRemoveUser(user)) { if (!_additional.isKicked(user)) { const auto isGroup = _peer->isChat() || _peer->isMegagroup(); result->addAction( @@ -1809,7 +1821,7 @@ auto ParticipantsBoxController::computeType( : _additional.adminRights(user).has_value() ? Rights::Admin : Rights::Normal; - result.canRemove = _additional.canRestrictUser(user); + result.canRemove = _additional.canRemoveUser(user); if (const auto channel = _peer->asChannel()) { result.adminRank = channel->adminRank(user); } diff --git a/Telegram/SourceFiles/boxes/peers/edit_participants_box.h b/Telegram/SourceFiles/boxes/peers/edit_participants_box.h index fd36c97ce..5c439f198 100644 --- a/Telegram/SourceFiles/boxes/peers/edit_participants_box.h +++ b/Telegram/SourceFiles/boxes/peers/edit_participants_box.h @@ -88,6 +88,7 @@ public: [[nodiscard]] bool canEditAdmin(not_null user) const; [[nodiscard]] bool canAddOrEditAdmin(not_null user) const; [[nodiscard]] bool canRestrictUser(not_null user) const; + [[nodiscard]] bool canRemoveUser(not_null user) const; [[nodiscard]] std::optional adminRights( not_null user) const; QString adminRank(not_null user) const; diff --git a/Telegram/SourceFiles/core/changelogs.cpp b/Telegram/SourceFiles/core/changelogs.cpp index e449f4afa..361d80113 100644 --- a/Telegram/SourceFiles/core/changelogs.cpp +++ b/Telegram/SourceFiles/core/changelogs.cpp @@ -18,30 +18,6 @@ namespace { std::map BetaLogs() { 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, "\xE2\x80\xA2 Fix crash in shared links search.\n" @@ -63,6 +39,13 @@ std::map BetaLogs() { "was added to archive.\n" "\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." } }; }; diff --git a/Telegram/SourceFiles/core/version.h b/Telegram/SourceFiles/core/version.h index 318212b56..59daf9388 100644 --- a/Telegram/SourceFiles/core/version.h +++ b/Telegram/SourceFiles/core/version.h @@ -23,7 +23,7 @@ constexpr auto AppId = "{C4A4AE8F-B9F7-4CC7-8A6C-BF7EEE87ACA5}"_cs; constexpr auto AppNameOld = "Telegram Win (Unofficial)"_cs; constexpr auto AppName = "Kotatogram Desktop"_cs; constexpr auto AppFile = "Kotatogram"_cs; -constexpr auto AppVersion = 2001007; -constexpr auto AppVersionStr = "2.1.7"; +constexpr auto AppVersion = 2001008; +constexpr auto AppVersionStr = "2.1.8"; constexpr auto AppBetaVersion = true; constexpr auto AppAlphaVersion = TDESKTOP_ALPHA_VERSION; diff --git a/Telegram/SourceFiles/data/data_cloud_file.cpp b/Telegram/SourceFiles/data/data_cloud_file.cpp index 258b71d50..6fe8accbb 100644 --- a/Telegram/SourceFiles/data/data_cloud_file.cpp +++ b/Telegram/SourceFiles/data/data_cloud_file.cpp @@ -16,6 +16,12 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL 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( not_null session, QImage image) { @@ -224,7 +230,8 @@ void LoadCloudFile( } // NB! file.loader may be in ~FileLoader() already. if (const auto loader = base::take(file.loader)) { - if (file.flags & CloudFile::Flag::Cancelled) { + if ((file.flags & CloudFile::Flag::Cancelled) + && !loader->cancelled()) { loader->cancel(); } } diff --git a/Telegram/SourceFiles/data/data_cloud_file.h b/Telegram/SourceFiles/data/data_cloud_file.h index e295cd9cc..60fdf72b1 100644 --- a/Telegram/SourceFiles/data/data_cloud_file.h +++ b/Telegram/SourceFiles/data/data_cloud_file.h @@ -34,6 +34,8 @@ struct CloudFile final { }; friend inline constexpr bool is_flag_type(Flag) { return true; }; + ~CloudFile(); + ImageLocation location; std::unique_ptr loader; int byteSize = 0; diff --git a/Telegram/SourceFiles/overview/overview_layout.cpp b/Telegram/SourceFiles/overview/overview_layout.cpp index f456de3fe..171ed4e8a 100644 --- a/Telegram/SourceFiles/overview/overview_layout.cpp +++ b/Telegram/SourceFiles/overview/overview_layout.cpp @@ -1433,6 +1433,11 @@ Link::Link( } } + const auto createHandler = [](const QString &url) { + return UrlClickHandler::IsSuspicious(url) + ? std::make_shared(url) + : std::make_shared(url); + }; _page = media ? media->webpage() : nullptr; if (_page) { mainUrl = _page->url; @@ -1442,7 +1447,7 @@ Link::Link( parent->fullId()); } else if (_page->photo) { if (_page->type == WebPageType::Profile || _page->type == WebPageType::Video) { - _photol = std::make_shared(_page->url); + _photol = createHandler(_page->url); } else if (_page->type == WebPageType::Photo || _page->siteName == qstr("Twitter") || _page->siteName == qstr("Facebook")) { @@ -1450,13 +1455,13 @@ Link::Link( _page->photo, parent->fullId()); } else { - _photol = std::make_shared(_page->url); + _photol = createHandler(_page->url); } } else { - _photol = std::make_shared(_page->url); + _photol = createHandler(_page->url); } } else if (!mainUrl.isEmpty()) { - _photol = std::make_shared(mainUrl); + _photol = createHandler(mainUrl); } if (from >= till && _page) { text = _page->description.text; diff --git a/Telegram/build/version b/Telegram/build/version index 143da2267..49b43a09d 100644 --- a/Telegram/build/version +++ b/Telegram/build/version @@ -1,7 +1,7 @@ -AppVersion 2001007 +AppVersion 2001008 AppVersionStrMajor 2.1 -AppVersionStrSmall 2.1.7 -AppVersionStr 2.1.7 -BetaChannel 0 -AlphaVersion 2001007004 -AppVersionOriginal 2.1.7.4 +AppVersionStrSmall 2.1.8 +AppVersionStr 2.1.8 +BetaChannel 1 +AlphaVersion 0 +AppVersionOriginal 2.1.8.beta diff --git a/Telegram/lib_spellcheck b/Telegram/lib_spellcheck index 019bb19f0..48865e514 160000 --- a/Telegram/lib_spellcheck +++ b/Telegram/lib_spellcheck @@ -1 +1 @@ -Subproject commit 019bb19f0923af2e8c7e0cd1abc2b8d9264afb7c +Subproject commit 48865e514979b4e2610fe6ca22bbb145bcfab4ea diff --git a/Telegram/lib_ui b/Telegram/lib_ui index bb182bbf5..a32ee9581 160000 --- a/Telegram/lib_ui +++ b/Telegram/lib_ui @@ -1 +1 @@ -Subproject commit bb182bbf5d66921cfcd182643d7e156e19d1884a +Subproject commit a32ee9581d33f684e80a0b92e1cb29c748f091a1 diff --git a/changelog.txt b/changelog.txt index 6fd363d75..d24caa27b 100644 --- a/changelog.txt +++ b/changelog.txt @@ -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) - Fix the Fcitx input method plugin.