2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

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

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