diff --git a/Telegram/Resources/uwp/AppX/AppxManifest.xml b/Telegram/Resources/uwp/AppX/AppxManifest.xml
index 51a88ecbe..cf404e12b 100644
--- a/Telegram/Resources/uwp/AppX/AppxManifest.xml
+++ b/Telegram/Resources/uwp/AppX/AppxManifest.xml
@@ -9,7 +9,7 @@
+ Version="1.8.2.2" />
Telegram Desktop
Telegram FZ-LLC
diff --git a/Telegram/Resources/winrc/Telegram.rc b/Telegram/Resources/winrc/Telegram.rc
index f39a0d347..fdbb90be9 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,8,2,1
- PRODUCTVERSION 1,8,2,1
+ FILEVERSION 1,8,2,2
+ PRODUCTVERSION 1,8,2,2
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -52,10 +52,10 @@ BEGIN
BEGIN
VALUE "CompanyName", "Telegram FZ-LLC"
VALUE "FileDescription", "Telegram Desktop"
- VALUE "FileVersion", "1.8.2.1"
+ VALUE "FileVersion", "1.8.2.2"
VALUE "LegalCopyright", "Copyright (C) 2014-2019"
VALUE "ProductName", "Telegram Desktop"
- VALUE "ProductVersion", "1.8.2.1"
+ VALUE "ProductVersion", "1.8.2.2"
END
END
BLOCK "VarFileInfo"
diff --git a/Telegram/Resources/winrc/Updater.rc b/Telegram/Resources/winrc/Updater.rc
index 110db45ab..555a2347c 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,8,2,1
- PRODUCTVERSION 1,8,2,1
+ FILEVERSION 1,8,2,2
+ PRODUCTVERSION 1,8,2,2
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -43,10 +43,10 @@ BEGIN
BEGIN
VALUE "CompanyName", "Telegram FZ-LLC"
VALUE "FileDescription", "Telegram Desktop Updater"
- VALUE "FileVersion", "1.8.2.1"
+ VALUE "FileVersion", "1.8.2.2"
VALUE "LegalCopyright", "Copyright (C) 2014-2019"
VALUE "ProductName", "Telegram Desktop"
- VALUE "ProductVersion", "1.8.2.1"
+ VALUE "ProductVersion", "1.8.2.2"
END
END
BLOCK "VarFileInfo"
diff --git a/Telegram/SourceFiles/core/version.h b/Telegram/SourceFiles/core/version.h
index e3e0cd12f..dbc626cb2 100644
--- a/Telegram/SourceFiles/core/version.h
+++ b/Telegram/SourceFiles/core/version.h
@@ -7,7 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#pragma once
-#define TDESKTOP_REQUESTED_ALPHA_VERSION (1008002001ULL)
+#define TDESKTOP_REQUESTED_ALPHA_VERSION (1008002002ULL)
#ifdef TDESKTOP_OFFICIAL_TARGET
#define TDESKTOP_ALPHA_VERSION TDESKTOP_REQUESTED_ALPHA_VERSION
diff --git a/Telegram/SourceFiles/mtproto/connection.cpp b/Telegram/SourceFiles/mtproto/connection.cpp
index 3b9230c02..a5a7cdd33 100644
--- a/Telegram/SourceFiles/mtproto/connection.cpp
+++ b/Telegram/SourceFiles/mtproto/connection.cpp
@@ -541,7 +541,9 @@ void ConnectionPrivate::resetSession() { // recreate all msg_id and msg_seqno
mtpMsgId id = i.key();
if (id > newId) {
while (true) {
- if (toResend.constFind(newId) == toResend.cend() && wereAcked.constFind(newId) == wereAcked.cend() && haveSent.constFind(newId) == haveSent.cend()) {
+ if (toResend.constFind(newId) == toResend.cend()
+ && wereAcked.constFind(newId) == wereAcked.cend()
+ && haveSent.constFind(newId) == haveSent.cend()) {
break;
}
const auto m = base::unixtime::mtproto_msg_id();
@@ -550,7 +552,9 @@ void ConnectionPrivate::resetSession() { // recreate all msg_id and msg_seqno
newId = m;
}
- MTP_LOG(_shiftedDcId, ("Replacing msgId %1 to %2!").arg(id).arg(newId));
+ MTP_LOG(_shiftedDcId, ("Replacing msgId %1 to %2!"
+ ).arg(id
+ ).arg(newId));
replaces.insert(id, newId);
id = newId;
*(mtpMsgId*)(i.value()->data() + 4) = id;
@@ -558,7 +562,8 @@ void ConnectionPrivate::resetSession() { // recreate all msg_id and msg_seqno
setSeqNumbers.insert(id, i.value());
}
}
- for (auto i = toResend.cbegin(), e = toResend.cend(); i != e; ++i) { // collect all non-container requests
+ // Collect all non-container requests.
+ for (auto i = toResend.cbegin(), e = toResend.cend(); i != e; ++i) {
const auto j = toSend.constFind(i.value());
if (j == toSend.cend()) continue;
@@ -568,7 +573,9 @@ void ConnectionPrivate::resetSession() { // recreate all msg_id and msg_seqno
mtpMsgId id = i.key();
if (id > newId) {
while (true) {
- if (toResend.constFind(newId) == toResend.cend() && wereAcked.constFind(newId) == wereAcked.cend() && haveSent.constFind(newId) == haveSent.cend()) {
+ if (toResend.constFind(newId) == toResend.cend()
+ && wereAcked.constFind(newId) == wereAcked.cend()
+ && haveSent.constFind(newId) == haveSent.cend()) {
break;
}
const auto m = base::unixtime::mtproto_msg_id();
@@ -577,7 +584,9 @@ void ConnectionPrivate::resetSession() { // recreate all msg_id and msg_seqno
newId = m;
}
- MTP_LOG(_shiftedDcId, ("Replacing msgId %1 to %2!").arg(id).arg(newId));
+ MTP_LOG(_shiftedDcId, ("Replacing msgId %1 to %2!"
+ ).arg(id
+ ).arg(newId));
replaces.insert(id, newId);
id = newId;
*(mtpMsgId*)(j.value()->data() + 4) = id;
@@ -610,6 +619,10 @@ void ConnectionPrivate::resetSession() { // recreate all msg_id and msg_seqno
}
const auto l = wereAcked.find(i.key());
if (l != wereAcked.cend()) {
+ DEBUG_LOG(("MTP Info: Replaced %1 with %2 in wereAcked."
+ ).arg(i.key()
+ ).arg(i.value()));
+
const auto req = l.value();
wereAcked.erase(l);
wereAcked.insert(i.value(), req);
diff --git a/Telegram/build/version b/Telegram/build/version
index 74d4e3768..17a0c0f14 100644
--- a/Telegram/build/version
+++ b/Telegram/build/version
@@ -3,4 +3,4 @@ AppVersionStrMajor 1.8
AppVersionStrSmall 1.8.2
AppVersionStr 1.8.2
BetaChannel 0
-AlphaVersion 1008002001
+AlphaVersion 1008002002