diff --git a/Telegram/Resources/uwp/AppX/AppxManifest.xml b/Telegram/Resources/uwp/AppX/AppxManifest.xml
index 184b66b97..9bc50a2e4 100644
--- a/Telegram/Resources/uwp/AppX/AppxManifest.xml
+++ b/Telegram/Resources/uwp/AppX/AppxManifest.xml
@@ -9,7 +9,7 @@
+ Version="1.0.20.0" />
Telegram Desktop
Telegram Messenger LLP
diff --git a/Telegram/Resources/winrc/Telegram.rc b/Telegram/Resources/winrc/Telegram.rc
index 5a4715ad4..175b5a983 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,0,19,0
- PRODUCTVERSION 1,0,19,0
+ FILEVERSION 1,0,20,0
+ PRODUCTVERSION 1,0,20,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.0.19.0"
+ VALUE "FileVersion", "1.0.20.0"
VALUE "LegalCopyright", "Copyright (C) 2014-2017"
VALUE "ProductName", "Telegram Desktop"
- VALUE "ProductVersion", "1.0.19.0"
+ VALUE "ProductVersion", "1.0.20.0"
END
END
BLOCK "VarFileInfo"
diff --git a/Telegram/Resources/winrc/Updater.rc b/Telegram/Resources/winrc/Updater.rc
index 3d2358908..04b937c36 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,0,19,0
- PRODUCTVERSION 1,0,19,0
+ FILEVERSION 1,0,20,0
+ PRODUCTVERSION 1,0,20,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.0.19.0"
+ VALUE "FileVersion", "1.0.20.0"
VALUE "LegalCopyright", "Copyright (C) 2014-2017"
VALUE "ProductName", "Telegram Desktop"
- VALUE "ProductVersion", "1.0.19.0"
+ VALUE "ProductVersion", "1.0.20.0"
END
END
BLOCK "VarFileInfo"
diff --git a/Telegram/SourceFiles/core/version.h b/Telegram/SourceFiles/core/version.h
index ec2df5c2a..c3d344876 100644
--- a/Telegram/SourceFiles/core/version.h
+++ b/Telegram/SourceFiles/core/version.h
@@ -24,7 +24,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
#define BETA_VERSION_MACRO (0ULL)
-constexpr int AppVersion = 1000019;
-constexpr str_const AppVersionStr = "1.0.19";
+constexpr int AppVersion = 1000020;
+constexpr str_const AppVersionStr = "1.0.20";
constexpr bool AppAlphaVersion = true;
constexpr uint64 AppBetaVersion = BETA_VERSION_MACRO;
diff --git a/Telegram/SourceFiles/window/notifications_manager_default.cpp b/Telegram/SourceFiles/window/notifications_manager_default.cpp
index 2bfaefc19..0f45ba58b 100644
--- a/Telegram/SourceFiles/window/notifications_manager_default.cpp
+++ b/Telegram/SourceFiles/window/notifications_manager_default.cpp
@@ -321,9 +321,15 @@ void Manager::doClearFromItem(HistoryItem *item) {
return (queued.item == item);
}), _queuedNotifications.cend());
+ auto showNext = false;
for_const (auto ¬ification, _notifications) {
- // Calls unlinkFromShown() -> showNextFromQueue()
- notification->itemRemoved(item);
+ if (notification->unlinkItem(item)) {
+ showNext = true;
+ }
+ }
+ if (showNext) {
+ // This call invalidates _notifications iterators.
+ showNextFromQueue();
}
}
@@ -690,11 +696,13 @@ void Notification::updatePeerPhoto() {
update();
}
-void Notification::itemRemoved(HistoryItem *deleted) {
- if (_item && _item == deleted) {
+bool Notification::unlinkItem(HistoryItem *deleted) {
+ auto unlink = (_item && _item == deleted);
+ if (unlink) {
_item = nullptr;
- unlinkHistoryInManager();
+ unlinkHistory();
}
+ return unlink;
}
bool Notification::canReply() const {
diff --git a/Telegram/SourceFiles/window/notifications_manager_default.h b/Telegram/SourceFiles/window/notifications_manager_default.h
index 7417c8114..e8666b7a3 100644
--- a/Telegram/SourceFiles/window/notifications_manager_default.h
+++ b/Telegram/SourceFiles/window/notifications_manager_default.h
@@ -198,7 +198,7 @@ public:
}
// Called only by Manager.
- void itemRemoved(HistoryItem *del);
+ bool unlinkItem(HistoryItem *del);
bool unlinkHistory(History *history = nullptr);
bool checkLastInput(bool hasReplyingNotifications);
diff --git a/Telegram/build/version b/Telegram/build/version
index 0da112c1d..e8eee0bcd 100644
--- a/Telegram/build/version
+++ b/Telegram/build/version
@@ -1,6 +1,6 @@
-AppVersion 1000019
+AppVersion 1000020
AppVersionStrMajor 1.0
-AppVersionStrSmall 1.0.19
-AppVersionStr 1.0.19
+AppVersionStrSmall 1.0.20
+AppVersionStr 1.0.20
AlphaChannel 1
BetaVersion 0
diff --git a/changelog.txt b/changelog.txt
index 4025ba259..4f38c9aa5 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -1,3 +1,7 @@
+1.0.20 alpha (08.03.17)
+
+- Bug fixes and other minor improvements.
+
1.0.19 alpha (08.03.17)
- Go to date. Click on the date in a chat to jump to a specific day.