diff --git a/Telegram/Resources/langs/lang.strings b/Telegram/Resources/langs/lang.strings
index 275e297b8..0f08fdf67 100644
--- a/Telegram/Resources/langs/lang.strings
+++ b/Telegram/Resources/langs/lang.strings
@@ -1089,7 +1089,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_profile_copy_phone" = "Copy Phone Number";
"lng_profile_copy_fullname" = "Copy Name";
-"lng_info_public_photo" = "public photo";
"lng_info_mobile_label" = "Mobile";
"lng_info_mobile_context_menu_fragment_about" = "This number is not tied to a SIM card and was acquired on {link}.";
"lng_info_mobile_context_menu_fragment_about_link" = "Fragment";
diff --git a/Telegram/Resources/uwp/AppX/AppxManifest.xml b/Telegram/Resources/uwp/AppX/AppxManifest.xml
index 8d315018c..60e1ac893 100644
--- a/Telegram/Resources/uwp/AppX/AppxManifest.xml
+++ b/Telegram/Resources/uwp/AppX/AppxManifest.xml
@@ -10,7 +10,7 @@
+ Version="4.6.0.0" />
Telegram Desktop
Telegram Messenger LLP
diff --git a/Telegram/Resources/winrc/Telegram.rc b/Telegram/Resources/winrc/Telegram.rc
index c9c655751..57dbef1bc 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 4,5,9,0
- PRODUCTVERSION 4,5,9,0
+ FILEVERSION 4,6,0,0
+ PRODUCTVERSION 4,6,0,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -62,10 +62,10 @@ BEGIN
BEGIN
VALUE "CompanyName", "Telegram FZ-LLC"
VALUE "FileDescription", "Telegram Desktop"
- VALUE "FileVersion", "4.5.9.0"
+ VALUE "FileVersion", "4.6.0.0"
VALUE "LegalCopyright", "Copyright (C) 2014-2023"
VALUE "ProductName", "Telegram Desktop"
- VALUE "ProductVersion", "4.5.9.0"
+ VALUE "ProductVersion", "4.6.0.0"
END
END
BLOCK "VarFileInfo"
diff --git a/Telegram/Resources/winrc/Updater.rc b/Telegram/Resources/winrc/Updater.rc
index 79a7a2367..020b2bf23 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 4,5,9,0
- PRODUCTVERSION 4,5,9,0
+ FILEVERSION 4,6,0,0
+ PRODUCTVERSION 4,6,0,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", "4.5.9.0"
+ VALUE "FileVersion", "4.6.0.0"
VALUE "LegalCopyright", "Copyright (C) 2014-2023"
VALUE "ProductName", "Telegram Desktop"
- VALUE "ProductVersion", "4.5.9.0"
+ VALUE "ProductVersion", "4.6.0.0"
END
END
BLOCK "VarFileInfo"
diff --git a/Telegram/SourceFiles/boxes/peers/edit_peer_permissions_box.cpp b/Telegram/SourceFiles/boxes/peers/edit_peer_permissions_box.cpp
index a7391e7c2..b314d3009 100644
--- a/Telegram/SourceFiles/boxes/peers/edit_peer_permissions_box.cpp
+++ b/Telegram/SourceFiles/boxes/peers/edit_peer_permissions_box.cpp
@@ -220,23 +220,6 @@ ChatRestrictions NegateRestrictions(ChatRestrictions value) {
| Flag::SendOther);
}
-[[nodiscard]] std::vector MediaRestrictions() {
- return std::vector{
- ChatRestriction::SendPhotos,
- ChatRestriction::SendVideos,
- ChatRestriction::SendVideoMessages,
- ChatRestriction::SendMusic,
- ChatRestriction::SendVoiceMessages,
- ChatRestriction::SendFiles,
- ChatRestriction::SendStickers
- | ChatRestriction::SendGifs
- | ChatRestriction::SendGames
- | ChatRestriction::SendInline,
- ChatRestriction::EmbedLinks,
- ChatRestriction::SendPolls,
- };
-}
-
auto Dependencies(ChatAdminRights)
-> std::vector> {
return {};
diff --git a/Telegram/SourceFiles/boxes/translate_box.cpp b/Telegram/SourceFiles/boxes/translate_box.cpp
index 12cf40337..20557206e 100644
--- a/Telegram/SourceFiles/boxes/translate_box.cpp
+++ b/Telegram/SourceFiles/boxes/translate_box.cpp
@@ -267,7 +267,6 @@ bool SkipTranslate(TextWithEntities textWithEntities) {
#ifndef TDESKTOP_DISABLE_SPELLCHECK
const auto result = Platform::Language::Recognize(text);
const auto skip = Core::App().settings().skipTranslationLanguages();
- const auto test = (result == result);
return result.known() && ranges::contains(skip, result);
#else
return false;
diff --git a/Telegram/SourceFiles/core/version.h b/Telegram/SourceFiles/core/version.h
index eedaeb6b7..d5fce7ea7 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 = 4005009;
-constexpr auto AppVersionStr = "4.5.9";
-constexpr auto AppBetaVersion = true;
+constexpr auto AppVersion = 4006000;
+constexpr auto AppVersionStr = "4.6";
+constexpr auto AppBetaVersion = false;
constexpr auto AppAlphaVersion = TDESKTOP_ALPHA_VERSION;
diff --git a/Telegram/SourceFiles/history/history_widget.cpp b/Telegram/SourceFiles/history/history_widget.cpp
index 3fde93a29..bf69515f2 100644
--- a/Telegram/SourceFiles/history/history_widget.cpp
+++ b/Telegram/SourceFiles/history/history_widget.cpp
@@ -4746,10 +4746,6 @@ void HistoryWidget::showMembersDropdown() {
bool HistoryWidget::pushTabbedSelectorToThirdSection(
not_null thread,
const Window::SectionShow ¶ms) {
- const auto selectorTypes = ChatRestriction::SendOther
- | ChatRestriction::SendInline
- | ChatRestriction::SendStickers
- | ChatRestriction::SendGifs;
if (!_tabbedPanel) {
return true;
} else if (!Data::CanSendAnyOf(
diff --git a/Telegram/SourceFiles/history/view/history_view_translate_bar.cpp b/Telegram/SourceFiles/history/view/history_view_translate_bar.cpp
index 620a0b892..3fb8d8067 100644
--- a/Telegram/SourceFiles/history/view/history_view_translate_bar.cpp
+++ b/Telegram/SourceFiles/history/view/history_view_translate_bar.cpp
@@ -497,7 +497,6 @@ void TranslateBar::showToast(
const QString &buttonText,
Fn buttonCallback) {
const auto st = std::make_shared(st::historyPremiumToast);
- const auto skip = st->padding.top();
st->padding.setRight(st::historyPremiumViewSet.font->width(buttonText)
- st::historyPremiumViewSet.width);
diff --git a/Telegram/SourceFiles/history/view/history_view_translate_tracker.cpp b/Telegram/SourceFiles/history/view/history_view_translate_tracker.cpp
index dad17969b..a75a95e09 100644
--- a/Telegram/SourceFiles/history/view/history_view_translate_tracker.cpp
+++ b/Telegram/SourceFiles/history/view/history_view_translate_tracker.cpp
@@ -48,7 +48,6 @@ rpl::producer TranslateTracker::trackingLanguage() const {
void TranslateTracker::setup() {
const auto peer = _history->peer;
- const auto session = &_history->session();
peer->updateFull();
using namespace rpl::mappers;
@@ -298,7 +297,6 @@ void TranslateTracker::applyLimit() {
}
void TranslateTracker::recognizeCollected() {
- const auto owner = &_history->owner();
for (auto &[id, entry] : _itemsForRecognize) {
if (const auto text = std::get_if(&entry.id)) {
entry.id = Platform::Language::Recognize(*text);
diff --git a/Telegram/SourceFiles/ui/controls/tabbed_search.cpp b/Telegram/SourceFiles/ui/controls/tabbed_search.cpp
index a0de7decb..cb28ea643 100644
--- a/Telegram/SourceFiles/ui/controls/tabbed_search.cpp
+++ b/Telegram/SourceFiles/ui/controls/tabbed_search.cpp
@@ -252,7 +252,7 @@ void GroupsStrip::mouseReleaseEvent(QMouseEvent *e) {
const auto chosen = (index < 0 || index >= _buttons.size())
? -1
: index;
- if (pressed == index && index >= 0) {
+ if (pressed == chosen && chosen >= 0) {
_chosen = pressed;
fireChosenGroup();
update();
diff --git a/Telegram/SourceFiles/ui/controls/userpic_button.cpp b/Telegram/SourceFiles/ui/controls/userpic_button.cpp
index a5dc688f4..4aab8ac81 100644
--- a/Telegram/SourceFiles/ui/controls/userpic_button.cpp
+++ b/Telegram/SourceFiles/ui/controls/userpic_button.cpp
@@ -210,13 +210,6 @@ void UserpicButton::prepare() {
prepareUserpicPixmap();
}
setClickHandlerByRole();
- if ((_role == Role::ChoosePhoto) || (_role == Role::ChangePhoto)) {
- const auto api = _controller
- ? &_controller->session().api()
- : _peer
- ? &_peer->session().api()
- : nullptr;
- }
}
void UserpicButton::showCustomOnChosen() {
diff --git a/Telegram/build/version b/Telegram/build/version
index df89d3957..ba60a1262 100644
--- a/Telegram/build/version
+++ b/Telegram/build/version
@@ -1,7 +1,7 @@
-AppVersion 4005009
-AppVersionStrMajor 4.5
-AppVersionStrSmall 4.5.9
-AppVersionStr 4.5.9
-BetaChannel 1
+AppVersion 4006000
+AppVersionStrMajor 4.6
+AppVersionStrSmall 4.6
+AppVersionStr 4.6.0
+BetaChannel 0
AlphaVersion 0
-AppVersionOriginal 4.5.9.beta
+AppVersionOriginal 4.6
diff --git a/changelog.txt b/changelog.txt
index e64328338..620260405 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -1,3 +1,12 @@
+4.6 (03.02.23)
+
+- Emoji Profile Pictures. Quickly create group and profile pictures from animated emoji and stickers with the new "Use an Emoji" option.
+- Emoji Categories. Filter stickers and emoji by categories like "love", "cheers" or "sleeping" in the sticker and emoji tabs.
+- Chat Translation. As a Premium user, translate entire chats in real time as you scroll them or receive new messages.
+- Media Permissions in Groups. Control whether members of your groups can send 9 distinct media types – like Photos, Voice or Video Messages.
+- Select Chats for Bots. Bot developers can now let users quickly select groups, channels or contacts that meet predefined criteria (more in @BotNews).
+- Open in New Window. Open chats or additional accounts in separate windows.
+
4.5.9 beta (02.02.23)
- Hide taskbar window preview when Telegram is locked by a passcode (Windows only).