diff --git a/Telegram/Resources/uwp/AppX/AppxManifest.xml b/Telegram/Resources/uwp/AppX/AppxManifest.xml
index 9d2f3375051b43..bdf4c5656ca1db 100644
--- a/Telegram/Resources/uwp/AppX/AppxManifest.xml
+++ b/Telegram/Resources/uwp/AppX/AppxManifest.xml
@@ -10,7 +10,7 @@
+ Version="4.0.0.0" />
Telegram Desktop
Telegram Messenger LLP
diff --git a/Telegram/Resources/winrc/Telegram.rc b/Telegram/Resources/winrc/Telegram.rc
index 8baa9d79e772a6..d41b3748dac913 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 3,7,6,0
- PRODUCTVERSION 3,7,6,0
+ FILEVERSION 4,0,0,0
+ PRODUCTVERSION 4,0,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", "3.7.6.0"
+ VALUE "FileVersion", "4.0.0.0"
VALUE "LegalCopyright", "Copyright (C) 2014-2022"
VALUE "ProductName", "Telegram Desktop"
- VALUE "ProductVersion", "3.7.6.0"
+ VALUE "ProductVersion", "4.0.0.0"
END
END
BLOCK "VarFileInfo"
diff --git a/Telegram/Resources/winrc/Updater.rc b/Telegram/Resources/winrc/Updater.rc
index f965b5883a0f64..ffdeb52f41b2ed 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 3,7,6,0
- PRODUCTVERSION 3,7,6,0
+ FILEVERSION 4,0,0,0
+ PRODUCTVERSION 4,0,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", "3.7.6.0"
+ VALUE "FileVersion", "4.0.0.0"
VALUE "LegalCopyright", "Copyright (C) 2014-2022"
VALUE "ProductName", "Telegram Desktop"
- VALUE "ProductVersion", "3.7.6.0"
+ VALUE "ProductVersion", "4.0.0.0"
END
END
BLOCK "VarFileInfo"
diff --git a/Telegram/SourceFiles/core/version.h b/Telegram/SourceFiles/core/version.h
index c8467a51f84735..152e240d40f11a 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 = 3007006;
-constexpr auto AppVersionStr = "3.7.6";
-constexpr auto AppBetaVersion = true;
+constexpr auto AppVersion = 4000000;
+constexpr auto AppVersionStr = "4.0";
+constexpr auto AppBetaVersion = false;
constexpr auto AppAlphaVersion = TDESKTOP_ALPHA_VERSION;
diff --git a/Telegram/SourceFiles/payments/payments_checkout_process.h b/Telegram/SourceFiles/payments/payments_checkout_process.h
index aaa8055103829e..9ad90c4062ab9c 100644
--- a/Telegram/SourceFiles/payments/payments_checkout_process.h
+++ b/Telegram/SourceFiles/payments/payments_checkout_process.h
@@ -147,7 +147,7 @@ class CheckoutProcess final
Ui::UncheckedCardDetails data,
bool saveInformation) override;
void panelShowBox(object_ptr box) override;
- QVariant panelClickHandlerContext();
+ QVariant panelClickHandlerContext() override;
QString panelWebviewDataPath() override;
diff --git a/Telegram/build/version b/Telegram/build/version
index bd71575797e6d1..7f005d0acf1eed 100644
--- a/Telegram/build/version
+++ b/Telegram/build/version
@@ -1,7 +1,7 @@
-AppVersion 3007006
-AppVersionStrMajor 3.7
-AppVersionStrSmall 3.7.6
-AppVersionStr 3.7.6
-BetaChannel 1
+AppVersion 4000000
+AppVersionStrMajor 4.0
+AppVersionStrSmall 4.0
+AppVersionStr 4.0.0
+BetaChannel 0
AlphaVersion 0
-AppVersionOriginal 3.7.6.beta
+AppVersionOriginal 4.0
diff --git a/Telegram/lib_ui b/Telegram/lib_ui
index 8de2eee8cc728d..8e0f9282056f41 160000
--- a/Telegram/lib_ui
+++ b/Telegram/lib_ui
@@ -1 +1 @@
-Subproject commit 8de2eee8cc728d19be06cc0a6e9e35496fefc732
+Subproject commit 8e0f9282056f418145b53c2d99e695e48775816c
diff --git a/changelog.txt b/changelog.txt
index 57af4769d8b46f..2c44ff360e557c 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -1,3 +1,20 @@
+4.0 (22.06.22)
+
+- Premium: Send media and files each up to 4 GB in size.
+- Premium: Download media and files at the fastest possible speed, with no limits.
+- Premium: Double most of the limits in the app.
+- Premium: Get a new button next to any voice message to generate a transcript of its audio.
+- Premium: React with even more emoji, including :clown: and :heart_eyes:.
+- Premium: Send unique stickers with additional effects, updated monthly.
+- Premium: Set a default chat folder or enable tools to auto-archive and hide new chats.
+- Premium: Subscribers have a badge next to their name, showing they help support Telegram.
+- Premium: Show off your profile video that will be animated for everyone in chats and the chat list.
+- Premium: Sponsored Messages that are sometimes shown in public channels will no longer appear.
+- Enable join requests for your public groups – no invite links required.
+- Users who open the group will see an Apply to Join Group button.
+- Once approved by an admin, users will be able to participate in the chat.
+- Bots that are integrated into the attachment menu can be programmed to work in groups and channels.
+
3.7.6 beta (16.06.22)
- Settings > Advanced > Experimental adds an option to open chats in separate windows.