version 0.8.10.dev with fixes in webpage layout, history load and history msgs reg

This commit is contained in:
John Preston 2015-05-01 02:05:19 +03:00
parent 3fc74166de
commit c54aadcac3
10 changed files with 43 additions and 25 deletions

View File

@ -1,9 +1,9 @@
@echo OFF @echo OFF
set "AppVersion=8009" set "AppVersion=8010"
set "AppVersionStrSmall=0.8.9" set "AppVersionStrSmall=0.8.10"
set "AppVersionStr=0.8.9" set "AppVersionStr=0.8.10"
set "AppVersionStrFull=0.8.9.0" set "AppVersionStrFull=0.8.10.0"
set "DevChannel=1" set "DevChannel=1"
if %DevChannel% neq 0 goto preparedev if %DevChannel% neq 0 goto preparedev

View File

@ -662,8 +662,8 @@ void Application::checkMapVersion() {
psRegisterCustomScheme(); psRegisterCustomScheme();
if (Local::oldMapVersion()) { if (Local::oldMapVersion()) {
QString versionFeatures; QString versionFeatures;
if (DevChannel && Local::oldMapVersion() < 8009) { if (DevChannel && Local::oldMapVersion() < 8010) {
versionFeatures = QString::fromUtf8("\xe2\x80\x94 Invite links for group chats\n\xe2\x80\x94 Gray unread badge for muted conversations").replace('@', qsl("@") + QChar(0x200D)); versionFeatures = QString::fromUtf8("\xe2\x80\x94 Critical bug fixes with message history loading").replace('@', qsl("@") + QChar(0x200D));
} else if (!DevChannel && Local::oldMapVersion() < 8007) { } else if (!DevChannel && Local::oldMapVersion() < 8007) {
versionFeatures = lang(lng_new_version_text).trimmed(); versionFeatures = lang(lng_new_version_text).trimmed();
} }

View File

@ -17,8 +17,8 @@ Copyright (c) 2014 John Preston, https://desktop.telegram.org
*/ */
#pragma once #pragma once
static const int32 AppVersion = 8009; static const int32 AppVersion = 8010;
static const wchar_t *AppVersionStr = L"0.8.9"; static const wchar_t *AppVersionStr = L"0.8.10";
static const bool DevChannel = true; static const bool DevChannel = true;
static const wchar_t *AppNameOld = L"Telegram Win (Unofficial)"; static const wchar_t *AppNameOld = L"Telegram Win (Unofficial)";

View File

@ -549,6 +549,12 @@ HistoryItem *History::createItem(HistoryBlock *block, const MTPmessage &msg, boo
HistoryItem *existing = App::histItemById(msgId); HistoryItem *existing = App::histItemById(msgId);
if (existing) { if (existing) {
bool regged = false;
if (existing->detached() && block) {
existing->attach(block);
regged = true;
}
const MTPMessageMedia *media = 0; const MTPMessageMedia *media = 0;
switch (msg.type()) { switch (msg.type()) {
case mtpc_message: media = &msg.c_message().vmedia; break; case mtpc_message: media = &msg.c_message().vmedia; break;
@ -556,7 +562,7 @@ HistoryItem *History::createItem(HistoryBlock *block, const MTPmessage &msg, boo
if (media) { if (media) {
existing->updateMedia(*media); existing->updateMedia(*media);
} }
return returnExisting ? existing : 0; return (returnExisting || regged) ? existing : 0;
} }
switch (msg.type()) { switch (msg.type()) {
@ -3342,7 +3348,7 @@ void HistoryWebPage::initDimensions(const HistoryItem *parent) {
w = thumbw; w = thumbw;
_maxw = st::webPageLeft + qMax(w, int32(st::minPhotoSize)) + parent->timeWidth(true); _maxw = st::webPageLeft + qMax(thumbh, qMax(w, int32(st::minPhotoSize))) + parent->timeWidth(true);
_minh = qMax(thumbh, int32(st::minPhotoSize)); _minh = qMax(thumbh, int32(st::minPhotoSize));
_minh += st::webPagePhotoSkip; _minh += st::webPagePhotoSkip;
} else { } else {

View File

@ -660,6 +660,9 @@ public:
bool detached() const { bool detached() const {
return !_block; return !_block;
} }
void attach(HistoryBlock *block) {
_block = block;
}
bool out() const { bool out() const {
return _flags & MTPDmessage_flag_out; return _flags & MTPDmessage_flag_out;
} }

View File

@ -1977,7 +1977,8 @@ void HistoryWidget::showPeer(const PeerId &peer, MsgId msgId, bool force, bool l
if (hist) { if (hist) {
if (histPeer->id == peer) { if (histPeer->id == peer) {
if (msgId != hist->activeMsgId) { if (msgId != hist->activeMsgId) {
if (!force && !hist->canShowAround(msgId)) { bool canShowNow = hist->canShowAround(msgId);
if (!force && !canShowNow) {
if (_loadingAroundId != msgId) { if (_loadingAroundId != msgId) {
clearLoadingAround(); clearLoadingAround();
_loadingAroundId = msgId; _loadingAroundId = msgId;
@ -1986,9 +1987,13 @@ void HistoryWidget::showPeer(const PeerId &peer, MsgId msgId, bool force, bool l
return; return;
} }
hist->loadAround(msgId); hist->loadAround(msgId);
if (histPreloading) MTP::cancel(histPreloading); if (!canShowNow) {
if (histPreloadingDown) MTP::cancel(histPreloadingDown); histPreload.clear();
histPreloading = histPreloadingDown = 0; histPreloadDown.clear();
if (histPreloading) MTP::cancel(histPreloading);
if (histPreloadingDown) MTP::cancel(histPreloadingDown);
histPreloading = histPreloadingDown = 0;
}
} }
if (_replyReturn && _replyReturn->id == msgId) calcNextReplyReturn(); if (_replyReturn && _replyReturn->id == msgId) calcNextReplyReturn();
@ -2306,6 +2311,8 @@ bool HistoryWidget::messagesFailed(const RPCError &error, mtpRequestId requestId
void HistoryWidget::messagesReceived(const MTPmessages_Messages &messages, mtpRequestId requestId) { void HistoryWidget::messagesReceived(const MTPmessages_Messages &messages, mtpRequestId requestId) {
if (!hist) { if (!hist) {
histPreloading = histPreloadingDown = _loadingAroundRequest = 0; histPreloading = histPreloadingDown = _loadingAroundRequest = 0;
histPreload.clear();
histPreloadDown.clear();
return; return;
} }
@ -2355,11 +2362,13 @@ void HistoryWidget::messagesReceived(const MTPmessages_Messages &messages, mtpRe
_loadingAroundRequest = 0; _loadingAroundRequest = 0;
hist->loadAround(_loadingAroundId); hist->loadAround(_loadingAroundId);
if (hist->isEmpty()) { if (hist->isEmpty()) {
histPreload.clear();
histPreloadDown.clear();
if (histPreloading) MTP::cancel(histPreloading);
if (histPreloadingDown) MTP::cancel(histPreloadingDown);
histPreloading = histPreloadingDown = 0;
addMessagesToFront(*histList); addMessagesToFront(*histList);
} }
if (histPreloading) MTP::cancel(histPreloading);
if (histPreloadingDown) MTP::cancel(histPreloadingDown);
histPreloading = histPreloadingDown = 0;
showPeer(hist->peer->id, _loadingAroundId, true); showPeer(hist->peer->id, _loadingAroundId, true);
} }
return; return;

View File

@ -11,7 +11,7 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>APPL</string> <string>APPL</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>0.8.9</string> <string>0.8.10</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>????</string> <string>????</string>
<key>CFBundleURLTypes</key> <key>CFBundleURLTypes</key>

Binary file not shown.

View File

@ -1671,7 +1671,7 @@
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
COPY_PHASE_STRIP = NO; COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 0.8.9; CURRENT_PROJECT_VERSION = 0.8.10;
DEBUG_INFORMATION_FORMAT = dwarf; DEBUG_INFORMATION_FORMAT = dwarf;
GCC_GENERATE_DEBUGGING_SYMBOLS = YES; GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
GCC_OPTIMIZATION_LEVEL = 0; GCC_OPTIMIZATION_LEVEL = 0;
@ -1689,7 +1689,7 @@
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
COPY_PHASE_STRIP = YES; COPY_PHASE_STRIP = YES;
CURRENT_PROJECT_VERSION = 0.8.9; CURRENT_PROJECT_VERSION = 0.8.10;
GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
GCC_OPTIMIZATION_LEVEL = fast; GCC_OPTIMIZATION_LEVEL = fast;
GCC_PREFIX_HEADER = ./SourceFiles/stdafx.h; GCC_PREFIX_HEADER = ./SourceFiles/stdafx.h;
@ -1715,10 +1715,10 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = ""; CODE_SIGN_IDENTITY = "";
COPY_PHASE_STRIP = NO; COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 0.8.9; CURRENT_PROJECT_VERSION = 0.8.10;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DYLIB_COMPATIBILITY_VERSION = 0.8; DYLIB_COMPATIBILITY_VERSION = 0.8;
DYLIB_CURRENT_VERSION = 0.8.9; DYLIB_CURRENT_VERSION = 0.8.10;
ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_STRICT_OBJC_MSGSEND = YES;
FRAMEWORK_SEARCH_PATHS = ""; FRAMEWORK_SEARCH_PATHS = "";
GCC_GENERATE_DEBUGGING_SYMBOLS = YES; GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
@ -1857,10 +1857,10 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = ""; CODE_SIGN_IDENTITY = "";
COPY_PHASE_STRIP = NO; COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 0.8.9; CURRENT_PROJECT_VERSION = 0.8.10;
DEBUG_INFORMATION_FORMAT = dwarf; DEBUG_INFORMATION_FORMAT = dwarf;
DYLIB_COMPATIBILITY_VERSION = 0.8; DYLIB_COMPATIBILITY_VERSION = 0.8;
DYLIB_CURRENT_VERSION = 0.8.9; DYLIB_CURRENT_VERSION = 0.8.10;
ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_STRICT_OBJC_MSGSEND = YES;
FRAMEWORK_SEARCH_PATHS = ""; FRAMEWORK_SEARCH_PATHS = "";
GCC_GENERATE_DEBUGGING_SYMBOLS = YES; GCC_GENERATE_DEBUGGING_SYMBOLS = YES;

View File

@ -1,2 +1,2 @@
echo 8009 0.8.9 1 echo 8010 0.8.10 1
# AppVersion AppVersionStr DevChannel # AppVersion AppVersionStr DevChannel