diff --git a/Telegram/PrepareLinux.sh b/Telegram/PrepareLinux.sh
index 94a726a52..afc4d0a9c 100755
--- a/Telegram/PrepareLinux.sh
+++ b/Telegram/PrepareLinux.sh
@@ -1,5 +1,5 @@
-AppVersionStr=0.5.16
-AppVersion=5016
+AppVersionStr=0.5.17
+AppVersion=5017
if [ -d "./../Linux/Release/deploy/$AppVersionStr" ]; then
echo "Deploy folder for version $AppVersionStr already exists!"
diff --git a/Telegram/PrepareLinux32.sh b/Telegram/PrepareLinux32.sh
index f306f6dab..cd6cd91b4 100755
--- a/Telegram/PrepareLinux32.sh
+++ b/Telegram/PrepareLinux32.sh
@@ -1,5 +1,5 @@
-AppVersionStr=0.5.16
-AppVersion=5016
+AppVersionStr=0.5.17
+AppVersion=5017
if [ -d "./../Linux/Release/deploy/$AppVersionStr" ]; then
echo "Deploy folder for version $AppVersionStr already exists!"
diff --git a/Telegram/PrepareMac.sh b/Telegram/PrepareMac.sh
index df3b18afa..50820e3be 100755
--- a/Telegram/PrepareMac.sh
+++ b/Telegram/PrepareMac.sh
@@ -1,5 +1,5 @@
-AppVersionStr=0.5.16
-AppVersion=5016
+AppVersionStr=0.5.17
+AppVersion=5017
if [ -d "./../Mac/Release/deploy/$AppVersionStr" ]; then
echo "Deploy folder for version $AppVersionStr already exists!"
diff --git a/Telegram/Setup.iss b/Telegram/Setup.iss
index 423e490af..617368fcb 100644
--- a/Telegram/Setup.iss
+++ b/Telegram/Setup.iss
@@ -3,9 +3,9 @@
#define MyAppShortName "Telegram"
#define MyAppName "Telegram Win (Unofficial)"
-#define MyAppVersion "0.5.16"
-#define MyAppVersionZero "0.5.16"
-#define MyAppFullVersion "0.5.16.0"
+#define MyAppVersion "0.5.17"
+#define MyAppVersionZero "0.5.17"
+#define MyAppFullVersion "0.5.17.0"
#define MyAppPublisher "Telegram (Unofficial)"
#define MyAppURL "https://tdesktop.com"
#define MyAppExeName "Telegram.exe"
diff --git a/Telegram/SourceFiles/config.h b/Telegram/SourceFiles/config.h
index f8cbf17f8..158fa0666 100644
--- a/Telegram/SourceFiles/config.h
+++ b/Telegram/SourceFiles/config.h
@@ -17,8 +17,8 @@ Copyright (c) 2014 John Preston, https://tdesktop.com
*/
#pragma once
-static const int32 AppVersion = 5016;
-static const wchar_t *AppVersionStr = L"0.5.16";
+static const int32 AppVersion = 5017;
+static const wchar_t *AppVersionStr = L"0.5.17";
#ifdef Q_OS_WIN
static const wchar_t *AppName = L"Telegram Win (Unofficial)";
#else
diff --git a/Telegram/SourceFiles/overviewwidget.cpp b/Telegram/SourceFiles/overviewwidget.cpp
index 67c4d38c8..c6f6ce035 100644
--- a/Telegram/SourceFiles/overviewwidget.cpp
+++ b/Telegram/SourceFiles/overviewwidget.cpp
@@ -392,6 +392,7 @@ void OverviewInner::dragActionStart(const QPoint &screenPos, Qt::MouseButton but
_selected.insert(_dragItem, selStatus);
_dragAction = Selecting;
updateMsg(_dragItem, _dragItemIndex);
+ _overview->updateTopBarSelection();
} else {
_dragAction = PrepareSelect;
}
@@ -521,6 +522,7 @@ void OverviewInner::applyDragSelection() {
}
_dragSelFrom = _dragSelTo = 0;
_dragSelFromIndex = _dragSelToIndex = -1;
+ _overview->updateTopBarSelection();
}
QPoint OverviewInner::mapMouseToItem(QPoint p, MsgId itemId, int32 itemIndex) {
@@ -1562,11 +1564,13 @@ void OverviewWidget::updateTopBarSelection() {
int32 selectedForForward, selectedForDelete;
_inner.getSelectionState(selectedForForward, selectedForDelete);
_selCount = selectedForDelete ? selectedForDelete : selectedForForward;
- App::main()->topBar()->showSelected(_selCount > 0 ? _selCount : 0);
- if (!App::wnd()->layerShown()) {
+ if (App::main()) {
+ App::main()->topBar()->showSelected(_selCount > 0 ? _selCount : 0);
+ App::main()->topBar()->update();
+ }
+ if (App::wnd() && !App::wnd()->layerShown()) {
_inner.setFocus();
}
- App::main()->topBar()->update();
update();
}
@@ -1652,6 +1656,8 @@ void OverviewWidget::fillSelectedItems(SelectedItemSet &sel, bool forDelete) {
}
OverviewWidget::~OverviewWidget() {
+ onClearSelected();
+ updateTopBarSelection();
}
void OverviewWidget::activate() {
diff --git a/Telegram/Telegram.plist b/Telegram/Telegram.plist
index b96cad668..47ff26c38 100644
--- a/Telegram/Telegram.plist
+++ b/Telegram/Telegram.plist
@@ -11,7 +11,7 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 0.5.16
+ 0.5.17
CFBundleSignature
????
NOTE
diff --git a/Telegram/Telegram.rc b/Telegram/Telegram.rc
index 0bd2465cb..bc27ee599 100644
Binary files a/Telegram/Telegram.rc and b/Telegram/Telegram.rc differ
diff --git a/Telegram/Telegram.xcodeproj/project.pbxproj b/Telegram/Telegram.xcodeproj/project.pbxproj
index 540f58f0d..e4fa63e02 100644
--- a/Telegram/Telegram.xcodeproj/project.pbxproj
+++ b/Telegram/Telegram.xcodeproj/project.pbxproj
@@ -1478,7 +1478,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
COPY_PHASE_STRIP = NO;
- CURRENT_PROJECT_VERSION = 0.5.16;
+ CURRENT_PROJECT_VERSION = 0.5.17;
DEBUG_INFORMATION_FORMAT = dwarf;
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
@@ -1496,7 +1496,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
COPY_PHASE_STRIP = YES;
- CURRENT_PROJECT_VERSION = 0.5.16;
+ CURRENT_PROJECT_VERSION = 0.5.17;
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
GCC_OPTIMIZATION_LEVEL = fast;
GCC_PREFIX_HEADER = ./SourceFiles/stdafx.h;
@@ -1521,10 +1521,10 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "";
COPY_PHASE_STRIP = NO;
- CURRENT_PROJECT_VERSION = 0.5.16;
+ CURRENT_PROJECT_VERSION = 0.5.17;
DEBUG_INFORMATION_FORMAT = dwarf;
DYLIB_COMPATIBILITY_VERSION = 0.5;
- DYLIB_CURRENT_VERSION = 0.5.16;
+ DYLIB_CURRENT_VERSION = 0.5.17;
FRAMEWORK_SEARCH_PATHS = "";
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
GCC_LINK_WITH_DYNAMIC_LIBRARIES = NO;
@@ -1650,10 +1650,10 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "";
COPY_PHASE_STRIP = NO;
- CURRENT_PROJECT_VERSION = 0.5.16;
+ CURRENT_PROJECT_VERSION = 0.5.17;
DEBUG_INFORMATION_FORMAT = dwarf;
DYLIB_COMPATIBILITY_VERSION = 0.5;
- DYLIB_CURRENT_VERSION = 0.5.16;
+ DYLIB_CURRENT_VERSION = 0.5.17;
FRAMEWORK_SEARCH_PATHS = "";
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
GCC_LINK_WITH_DYNAMIC_LIBRARIES = NO;