From ad12d6cc466ff87b76636343d28cbe542c23aa06 Mon Sep 17 00:00:00 2001
From: John Preston <johnprestonmail@gmail.com>
Date: Thu, 31 May 2018 21:37:15 +0300
Subject: [PATCH] Alpha version 1.2.25.

- Apply markdown formatting (```, `, **, __)
only when sending the message.
- Display connection quality bars in calls.
- Telegram Desktop can update itself through MTProto.
- Bug fixes and other minor improvements.
---
 Telegram/Resources/uwp/AppX/AppxManifest.xml |  2 +-
 Telegram/Resources/winrc/Telegram.rc         |  8 ++++----
 Telegram/Resources/winrc/Updater.rc          |  8 ++++----
 Telegram/SourceFiles/core/changelogs.cpp     | 11 +++++++++++
 Telegram/SourceFiles/core/update_checker.cpp |  8 +++-----
 Telegram/SourceFiles/core/version.h          |  8 ++++----
 Telegram/SourceFiles/intro/introphone.cpp    |  2 +-
 Telegram/build/version                       | 10 +++++-----
 changelog.txt                                |  7 +++++++
 9 files changed, 40 insertions(+), 24 deletions(-)

diff --git a/Telegram/Resources/uwp/AppX/AppxManifest.xml b/Telegram/Resources/uwp/AppX/AppxManifest.xml
index e9406df3f..67b704520 100644
--- a/Telegram/Resources/uwp/AppX/AppxManifest.xml
+++ b/Telegram/Resources/uwp/AppX/AppxManifest.xml
@@ -9,7 +9,7 @@
   <Identity Name="TelegramMessengerLLP.TelegramDesktop"
     ProcessorArchitecture="ARCHITECTURE"
     Publisher="CN=536BC709-8EE1-4478-AF22-F0F0F26FF64A"
-    Version="1.2.24.1" />
+    Version="1.2.25.0" />
   <Properties>
     <DisplayName>Telegram Desktop</DisplayName>
     <PublisherDisplayName>Telegram Messenger LLP</PublisherDisplayName>
diff --git a/Telegram/Resources/winrc/Telegram.rc b/Telegram/Resources/winrc/Telegram.rc
index 4cb33ca33..fcec159f6 100644
--- a/Telegram/Resources/winrc/Telegram.rc
+++ b/Telegram/Resources/winrc/Telegram.rc
@@ -34,8 +34,8 @@ IDI_ICON1               ICON                    "..\\art\\icon256.ico"
 //
 
 VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,2,24,1
- PRODUCTVERSION 1,2,24,1
+ FILEVERSION 1,2,25,0
+ PRODUCTVERSION 1,2,25,0
  FILEFLAGSMASK 0x3fL
 #ifdef _DEBUG
  FILEFLAGS 0x1L
@@ -52,10 +52,10 @@ BEGIN
         BEGIN
             VALUE "CompanyName", "Telegram Messenger LLP"
             VALUE "FileDescription", "Telegram Desktop"
-            VALUE "FileVersion", "1.2.24.1"
+            VALUE "FileVersion", "1.2.25.0"
             VALUE "LegalCopyright", "Copyright (C) 2014-2018"
             VALUE "ProductName", "Telegram Desktop"
-            VALUE "ProductVersion", "1.2.24.1"
+            VALUE "ProductVersion", "1.2.25.0"
         END
     END
     BLOCK "VarFileInfo"
diff --git a/Telegram/Resources/winrc/Updater.rc b/Telegram/Resources/winrc/Updater.rc
index c179bb1e4..3a6a954f3 100644
--- a/Telegram/Resources/winrc/Updater.rc
+++ b/Telegram/Resources/winrc/Updater.rc
@@ -25,8 +25,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
 //
 
 VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,2,24,1
- PRODUCTVERSION 1,2,24,1
+ FILEVERSION 1,2,25,0
+ PRODUCTVERSION 1,2,25,0
  FILEFLAGSMASK 0x3fL
 #ifdef _DEBUG
  FILEFLAGS 0x1L
@@ -43,10 +43,10 @@ BEGIN
         BEGIN
             VALUE "CompanyName", "Telegram Messenger LLP"
             VALUE "FileDescription", "Telegram Desktop Updater"
-            VALUE "FileVersion", "1.2.24.1"
+            VALUE "FileVersion", "1.2.25.0"
             VALUE "LegalCopyright", "Copyright (C) 2014-2018"
             VALUE "ProductName", "Telegram Desktop"
-            VALUE "ProductVersion", "1.2.24.1"
+            VALUE "ProductVersion", "1.2.25.0"
         END
     END
     BLOCK "VarFileInfo"
diff --git a/Telegram/SourceFiles/core/changelogs.cpp b/Telegram/SourceFiles/core/changelogs.cpp
index 644438490..f4a09d4a1 100644
--- a/Telegram/SourceFiles/core/changelogs.cpp
+++ b/Telegram/SourceFiles/core/changelogs.cpp
@@ -100,6 +100,17 @@ std::map<int, const char*> AlphaLogs() {
 		1002024,
 		"\xE2\x80\x94 Add links with custom text from context menu "
 		"or by Ctrl/Cmd + K keyboard shortcut."
+	},
+	{
+		1002025,
+		"\xE2\x80\x94 Apply markdown formatting (```, `, **, __) "
+		"only when sending the message.\n"
+
+		"\xE2\x80\x94 Display connection quality bars in calls.\n"
+
+		"\xE2\x80\x94 Telegram Desktop can update itself through MTProto.\n"
+
+		"\xE2\x80\x94 Bug fixes and other minor improvements."
 	}
 	};
 }
diff --git a/Telegram/SourceFiles/core/update_checker.cpp b/Telegram/SourceFiles/core/update_checker.cpp
index 49678643b..3fe4779cc 100644
--- a/Telegram/SourceFiles/core/update_checker.cpp
+++ b/Telegram/SourceFiles/core/update_checker.cpp
@@ -1741,8 +1741,8 @@ void Updater::start(bool forceWait) {
 	}
 
 	_retryTimer.cancel();
-	const auto constDelay = cBetaVersion() ? 60 : UpdateDelayConstPart;
-	const auto randDelay = cBetaVersion() ? 30 : UpdateDelayRandPart;
+	const auto constDelay = cBetaVersion() ? 600 : UpdateDelayConstPart;
+	const auto randDelay = cBetaVersion() ? 300 : UpdateDelayRandPart;
 	const auto updateInSecs = cLastUpdateCheck()
 		+ constDelay
 		+ int(rand() % randDelay)
@@ -1765,9 +1765,7 @@ void Updater::start(bool forceWait) {
 			std::make_unique<HttpChecker>(_testing));
 		startImplementation(
 			&_mtpImplementation,
-			(cBetaVersion()
-				? std::make_unique<MtpChecker>(_mtproto, _testing)
-				: nullptr));
+			std::make_unique<MtpChecker>(_mtproto, _testing));
 
 		_checking.fire({});
 	} else {
diff --git a/Telegram/SourceFiles/core/version.h b/Telegram/SourceFiles/core/version.h
index 86125dffc..86d5e5eea 100644
--- a/Telegram/SourceFiles/core/version.h
+++ b/Telegram/SourceFiles/core/version.h
@@ -9,9 +9,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
 
 #include "core/utils.h"
 
-#define BETA_VERSION_MACRO (1002024001ULL)
+#define BETA_VERSION_MACRO (0ULL)
 
-constexpr int AppVersion = 1002024;
-constexpr str_const AppVersionStr = "1.2.24";
-constexpr bool AppAlphaVersion = false;
+constexpr int AppVersion = 1002025;
+constexpr str_const AppVersionStr = "1.2.25";
+constexpr bool AppAlphaVersion = true;
 constexpr uint64 AppBetaVersion = BETA_VERSION_MACRO;
diff --git a/Telegram/SourceFiles/intro/introphone.cpp b/Telegram/SourceFiles/intro/introphone.cpp
index bb3a3fefc..3cc8178fe 100644
--- a/Telegram/SourceFiles/intro/introphone.cpp
+++ b/Telegram/SourceFiles/intro/introphone.cpp
@@ -192,7 +192,7 @@ void PhoneWidget::submit() {
 			rpcFail(&PhoneWidget::phoneSubmitFail));
 	};
 	const auto code = _country->iso();
-	if (!TermsAcceptRequired(code) || _termsAccepted) {
+	if (true || !TermsAcceptRequired(code) || _termsAccepted) {
 		sendCode();
 	} else {
 		acceptTerms(code, base::lambda_guarded(this, [=] {
diff --git a/Telegram/build/version b/Telegram/build/version
index 154ba387d..d35e70d20 100644
--- a/Telegram/build/version
+++ b/Telegram/build/version
@@ -1,6 +1,6 @@
-AppVersion         1002024
+AppVersion         1002025
 AppVersionStrMajor 1.2
-AppVersionStrSmall 1.2.24
-AppVersionStr      1.2.24
-AlphaChannel       0
-BetaVersion        1002024001
+AppVersionStrSmall 1.2.25
+AppVersionStr      1.2.25
+AlphaChannel       1
+BetaVersion        0
diff --git a/changelog.txt b/changelog.txt
index 51baad6ec..64a6ea982 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -1,3 +1,10 @@
+1.2.25 alpha (31.05.18)
+
+- Apply markdown formatting (```, `, **, __) only when sending the message.
+- Display connection quality bars in calls.
+- Telegram Desktop can update itself through MTProto.
+- Bug fixes and other minor improvements.
+
 1.2.24 alpha (26.05.18)
 
 - Add links with custom text from context menu or by Ctrl/Cmd + K keyboard shortcut.