diff --git a/Telegram/PrepareWin.bat b/Telegram/PrepareWin.bat
index e1a9c96d8..997f54058 100644
--- a/Telegram/PrepareWin.bat
+++ b/Telegram/PrepareWin.bat
@@ -1,10 +1,10 @@
@echo OFF
-set "AppVersion=8031"
-set "AppVersionStrSmall=0.8.31"
-set "AppVersionStr=0.8.31"
-set "AppVersionStrFull=0.8.31.0"
-set "DevChannel=1"
+set "AppVersion=8032"
+set "AppVersionStrSmall=0.8.32"
+set "AppVersionStr=0.8.32"
+set "AppVersionStrFull=0.8.32.0"
+set "DevChannel=0"
if %DevChannel% neq 0 goto preparedev
diff --git a/Telegram/SourceFiles/config.h b/Telegram/SourceFiles/config.h
index f8b83c672..767eba9eb 100644
--- a/Telegram/SourceFiles/config.h
+++ b/Telegram/SourceFiles/config.h
@@ -17,9 +17,9 @@ Copyright (c) 2014 John Preston, https://desktop.telegram.org
*/
#pragma once
-static const int32 AppVersion = 8031;
-static const wchar_t *AppVersionStr = L"0.8.31";
-static const bool DevChannel = true;
+static const int32 AppVersion = 8032;
+static const wchar_t *AppVersionStr = L"0.8.32";
+static const bool DevChannel = false;
static const wchar_t *AppNameOld = L"Telegram Win (Unofficial)";
static const wchar_t *AppName = L"Telegram Desktop";
diff --git a/Telegram/SourceFiles/gui/text.cpp b/Telegram/SourceFiles/gui/text.cpp
index 3ff93f7e5..d1de1358f 100644
--- a/Telegram/SourceFiles/gui/text.cpp
+++ b/Telegram/SourceFiles/gui/text.cpp
@@ -863,7 +863,7 @@ public:
}
void draw(int32 left, int32 top, int32 w, style::align align, int32 yFrom, int32 yTo, uint16 selectedFrom = 0, uint16 selectedTo = 0) {
- if (_t->_blocks.isEmpty()) return;
+ if (_t->isEmpty()) return;
_blocksSize = _t->_blocks.size();
if (!_textStyle) _initDefault();
@@ -1043,7 +1043,7 @@ public:
}
void drawElided(int32 left, int32 top, int32 w, style::align align, int32 lines, int32 yFrom, int32 yTo, int32 removeFromEnd) {
- if (lines <= 0) return;
+ if (lines <= 0 || _t->isNull()) return;
if (yTo < 0 || (lines - 1) * _t->_font->height < yTo) {
yTo = lines * _t->_font->height;
@@ -1057,7 +1057,7 @@ public:
_lnkX = x;
_lnkY = y;
_lnkResult = &_zeroLnk;
- if (_lnkX >= 0 && _lnkX < w && _lnkY >= 0) {
+ if (!_t->isNull() && _lnkX >= 0 && _lnkX < w && _lnkY >= 0) {
draw(0, 0, w, align, _lnkY, _lnkY + 1);
}
return *_lnkResult;
@@ -1067,7 +1067,7 @@ public:
lnk = TextLinkPtr();
inText = false;
- if (x >= 0 && x < w && y >= 0) {
+ if (!_t->isNull() && x >= 0 && x < w && y >= 0) {
_lnkX = x;
_lnkY = y;
_lnkResult = &lnk;
@@ -1081,8 +1081,7 @@ public:
symbol = 0;
after = false;
upon = false;
-
- if (y >= 0) {
+ if (!_t->isNull() && y >= 0) {
_lnkX = x;
_lnkY = y;
_getSymbol = &symbol;
diff --git a/Telegram/SourceFiles/gui/text.h b/Telegram/SourceFiles/gui/text.h
index e48417d02..cca0de8e0 100644
--- a/Telegram/SourceFiles/gui/text.h
+++ b/Telegram/SourceFiles/gui/text.h
@@ -485,6 +485,9 @@ public:
bool isEmpty() const {
return _text.isEmpty();
}
+ bool isNull() const {
+ return !_font;
+ }
QString original(uint16 selectedFrom = 0, uint16 selectedTo = 0xFFFF, bool expandLinks = true) const;
bool lastDots(int32 dots, int32 maxdots = 3) { // hack for typing animation
diff --git a/Telegram/SourceFiles/mtproto/mtpConnection.cpp b/Telegram/SourceFiles/mtproto/mtpConnection.cpp
index 6b34c2780..7b85e6732 100644
--- a/Telegram/SourceFiles/mtproto/mtpConnection.cpp
+++ b/Telegram/SourceFiles/mtproto/mtpConnection.cpp
@@ -1800,7 +1800,7 @@ void MTProtoConnectionPrivate::socketStart(bool afterConfig) {
if (afterConfig && (_conn4 || _conn6)) return;
- createConn(!noIPv4, !noIPv6);
+ createConn(!noIPv4, false/*!noIPv6*/);
retryTimer.stop();
_waitForConnectedTimer.stop();
diff --git a/Telegram/SourceFiles/structs.cpp b/Telegram/SourceFiles/structs.cpp
index 1031af76e..13615b966 100644
--- a/Telegram/SourceFiles/structs.cpp
+++ b/Telegram/SourceFiles/structs.cpp
@@ -126,10 +126,10 @@ void PeerData::updateName(const QString &newName, const QString &newNameOrPhone,
NameFirstChars oldChars = chars;
fillNames();
App::history(id)->updateNameText();
+ nameUpdated();
if (App::main()) {
emit App::main()->peerNameChanged(this, oldNames, oldChars);
}
- nameUpdated();
}
void UserData::setPhoto(const MTPUserProfilePhoto &p) {
@@ -198,7 +198,6 @@ void UserData::setName(const QString &first, const QString &last, const QString
void UserData::setPhone(const QString &newPhone) {
phone = newPhone;
- ++nameVersion;
}
void UserData::setBotInfoVersion(int32 version) {
diff --git a/Telegram/Telegram.plist b/Telegram/Telegram.plist
index 29cd45c3f..5b11e71ea 100644
--- a/Telegram/Telegram.plist
+++ b/Telegram/Telegram.plist
@@ -11,7 +11,7 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 0.8.31
+ 0.8.32
LSMinimumSystemVersion
$(MACOSX_DEPLOYMENT_TARGET)
CFBundleSignature
diff --git a/Telegram/Telegram.rc b/Telegram/Telegram.rc
index 26a9199d7..94fdb429a 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 355b117c6..fcd8e9bbb 100644
--- a/Telegram/Telegram.xcodeproj/project.pbxproj
+++ b/Telegram/Telegram.xcodeproj/project.pbxproj
@@ -1701,7 +1701,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
COPY_PHASE_STRIP = NO;
- CURRENT_PROJECT_VERSION = 0.8.31;
+ CURRENT_PROJECT_VERSION = 0.8.32;
DEBUG_INFORMATION_FORMAT = dwarf;
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
@@ -1719,7 +1719,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
COPY_PHASE_STRIP = YES;
- CURRENT_PROJECT_VERSION = 0.8.31;
+ CURRENT_PROJECT_VERSION = 0.8.32;
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
GCC_OPTIMIZATION_LEVEL = fast;
GCC_PREFIX_HEADER = ./SourceFiles/stdafx.h;
@@ -1745,10 +1745,10 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "";
COPY_PHASE_STRIP = NO;
- CURRENT_PROJECT_VERSION = 0.8.31;
+ CURRENT_PROJECT_VERSION = 0.8.32;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DYLIB_COMPATIBILITY_VERSION = 0.8;
- DYLIB_CURRENT_VERSION = 0.8.31;
+ DYLIB_CURRENT_VERSION = 0.8.32;
ENABLE_STRICT_OBJC_MSGSEND = YES;
FRAMEWORK_SEARCH_PATHS = "";
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
@@ -1888,10 +1888,10 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "";
COPY_PHASE_STRIP = NO;
- CURRENT_PROJECT_VERSION = 0.8.31;
+ CURRENT_PROJECT_VERSION = 0.8.32;
DEBUG_INFORMATION_FORMAT = dwarf;
DYLIB_COMPATIBILITY_VERSION = 0.8;
- DYLIB_CURRENT_VERSION = 0.8.31;
+ DYLIB_CURRENT_VERSION = 0.8.32;
ENABLE_STRICT_OBJC_MSGSEND = YES;
FRAMEWORK_SEARCH_PATHS = "";
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
diff --git a/Telegram/Version.sh b/Telegram/Version.sh
index fed753d6e..fea715868 100755
--- a/Telegram/Version.sh
+++ b/Telegram/Version.sh
@@ -1,2 +1,2 @@
-echo 8031 0.8.31 1
+echo 8032 0.8.32 0
# AppVersion AppVersionStr DevChannel