From 7d8973d45a8a119658416bcc4ea9ab1d2617ac2d Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 28 Dec 2015 02:44:10 +0300 Subject: [PATCH 1/3] Telegram.rc fixed for 9015003 beta version build --- Telegram/Telegram.rc | 32 ++++---------------------------- 1 file changed, 4 insertions(+), 28 deletions(-) diff --git a/Telegram/Telegram.rc b/Telegram/Telegram.rc index 0ce86ba4e..18d9dab78 100644 --- a/Telegram/Telegram.rc +++ b/Telegram/Telegram.rc @@ -1,40 +1,16 @@ // Microsoft Visual C++ generated resource script. // #include "resource.h" -///////////////////////////////////////////////////////////////////////////// -// Russian (Russia) resources -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS) -LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT -#pragma code_page(1251) - -#ifdef APSTUDIO_INVOKED +#define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // -// TEXTINCLUDE +// Generated from the TEXTINCLUDE 2 resource. // +#include "winres.h" -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "\0" -END - -3 TEXTINCLUDE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - -#endif // Russian (Russia) resources ///////////////////////////////////////////////////////////////////////////// - +#undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // English (United States) resources From 4b99eb9c8d0f322d67e45e4a02ab2be8a6dd0f99 Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 28 Dec 2015 09:19:29 +0300 Subject: [PATCH 2/3] fixed crashes on quit, fixed scrolled sticker icons --- Telegram/SourceFiles/app.cpp | 4 ++-- Telegram/SourceFiles/dropdown.cpp | 1 + Telegram/SourceFiles/history.cpp | 2 +- Telegram/SourceFiles/history.h | 1 - 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Telegram/SourceFiles/app.cpp b/Telegram/SourceFiles/app.cpp index cf5372e4e..677da9d2d 100644 --- a/Telegram/SourceFiles/app.cpp +++ b/Telegram/SourceFiles/app.cpp @@ -1920,6 +1920,8 @@ namespace App { } void historyClearMsgs() { + ::repliesTo.clear(); + QVector toDelete; for (MsgsData::const_iterator i = msgsData.cbegin(), e = msgsData.cend(); i != e; ++i) { if ((*i)->detached()) { @@ -1945,7 +1947,6 @@ namespace App { } void historyClearItems() { - historyClearMsgs(); randomData.clear(); sentData.clear(); mutedPeers.clear(); @@ -1991,7 +1992,6 @@ namespace App { ::webPageItems.clear(); ::sharedContactItems.clear(); ::gifItems.clear(); - ::repliesTo.clear(); lastPhotos.clear(); lastPhotosMap.clear(); ::self = 0; diff --git a/Telegram/SourceFiles/dropdown.cpp b/Telegram/SourceFiles/dropdown.cpp index c424fcdb2..50f6efafd 100644 --- a/Telegram/SourceFiles/dropdown.cpp +++ b/Telegram/SourceFiles/dropdown.cpp @@ -2694,6 +2694,7 @@ void EmojiPan::updateSelected() { if (y >= _iconsTop && y < _iconsTop + st::rbEmoji.height && x >= 0 && x < 7 * st::rbEmoji.width && x < _icons.size() * st::rbEmoji.width) { int32 skip = 0; for (int32 i = 0, l = _icons.size(); i < l; ++i) { + if (_icons.at(i).sticker) break; if (x < st::rbEmoji.width) { newOver = i; break; diff --git a/Telegram/SourceFiles/history.cpp b/Telegram/SourceFiles/history.cpp index c01d7f6f8..aa2934149 100644 --- a/Telegram/SourceFiles/history.cpp +++ b/Telegram/SourceFiles/history.cpp @@ -2290,7 +2290,7 @@ void History::setUnreadCount(int32 newUnreadCount, bool psUpdate) { App::histories().unreadFull += newUnreadCount - unreadCount; if (mute) App::histories().unreadMuted += newUnreadCount - unreadCount; unreadCount = newUnreadCount; - if (psUpdate && (!mute || cIncludeMuted())) App::wnd()->updateCounter(); + if (psUpdate && (!mute || cIncludeMuted()) && App::wnd()) App::wnd()->updateCounter(); if (unreadBar) { int32 count = unreadCount; if (peer->migrateTo()) { diff --git a/Telegram/SourceFiles/history.h b/Telegram/SourceFiles/history.h index 6342883df..722d8e358 100644 --- a/Telegram/SourceFiles/history.h +++ b/Telegram/SourceFiles/history.h @@ -52,7 +52,6 @@ public: void clear(); void remove(const PeerId &peer); ~Histories() { - clear(); unreadFull = unreadMuted = 0; } From b33323b62dbd34b198c2f6b7b2b4c3b47597450c Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 28 Dec 2015 09:23:24 +0300 Subject: [PATCH 3/3] beta 9015004 --- Telegram/SourceFiles/config.h | 2 +- Telegram/Telegram.rc | 8 ++++---- Telegram/Version | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Telegram/SourceFiles/config.h b/Telegram/SourceFiles/config.h index 443682926..718d2fb87 100644 --- a/Telegram/SourceFiles/config.h +++ b/Telegram/SourceFiles/config.h @@ -23,7 +23,7 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org static const int32 AppVersion = 9015; static const wchar_t *AppVersionStr = L"0.9.15"; static const bool DevVersion = false; -#define BETA_VERSION (9015003ULL) // just comment this line to build public version +#define BETA_VERSION (9015004ULL) // just comment this line to build public version static const wchar_t *AppNameOld = L"Telegram Win (Unofficial)"; static const wchar_t *AppName = L"Telegram Desktop"; diff --git a/Telegram/Telegram.rc b/Telegram/Telegram.rc index 18d9dab78..1392f2ddd 100644 --- a/Telegram/Telegram.rc +++ b/Telegram/Telegram.rc @@ -34,8 +34,8 @@ IDI_ICON1 ICON "SourceFiles\\art\\icon256.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,9,15,3 - PRODUCTVERSION 0,9,15,3 + FILEVERSION 0,9,15,4 + PRODUCTVERSION 0,9,15,4 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -51,10 +51,10 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "CompanyName", "Telegram Messenger LLP" - VALUE "FileVersion", "0.9.15.3" + VALUE "FileVersion", "0.9.15.4" VALUE "LegalCopyright", "Copyright (C) 2013" VALUE "ProductName", "Telegram Desktop" - VALUE "ProductVersion", "0.9.15.3" + VALUE "ProductVersion", "0.9.15.4" END END BLOCK "VarFileInfo" diff --git a/Telegram/Version b/Telegram/Version index 3f8f573fa..178d0d71b 100644 --- a/Telegram/Version +++ b/Telegram/Version @@ -3,4 +3,4 @@ AppVersionStrMajor 0.9 AppVersionStrSmall 0.9.15 AppVersionStr 0.9.15 DevChannel 0 -BetaVersion 9015003 +BetaVersion 9015004