mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-30 22:16:14 +00:00
version 0.8.8.dev - audio listened status, photo caption display, map places name-address display, gray muted badges, invite links support, some fixes
This commit is contained in:
@@ -3214,7 +3214,7 @@ void HistoryWidget::confirmSendImage(const ReadyLocalMedia &img) {
|
||||
h->loadAround(0);
|
||||
int32 flags = (h->peer->input.type() == mtpc_inputPeerSelf) ? 0 : (MTPDmessage_flag_unread | MTPDmessage_flag_out); // unread, out
|
||||
if (img.replyTo) flags |= MTPDmessage::flag_reply_to_msg_id;
|
||||
h->addToBack(MTP_message(MTP_int(flags), MTP_int(newId), MTP_int(MTP::authedId()), App::peerToMTP(img.peer), MTPint(), MTPint(), MTP_int(img.replyTo), MTP_int(unixtime()), MTP_string(""), MTP_messageMediaPhoto(img.photo)));
|
||||
h->addToBack(MTP_message(MTP_int(flags), MTP_int(newId), MTP_int(MTP::authedId()), App::peerToMTP(img.peer), MTPint(), MTPint(), MTP_int(img.replyTo), MTP_int(unixtime()), MTP_string(""), MTP_messageMediaPhoto(img.photo, MTP_string(""))));
|
||||
} else if (img.type == ToPrepareDocument) {
|
||||
h->loadAround(0);
|
||||
int32 flags = (h->peer->input.type() == mtpc_inputPeerSelf) ? 0 : (MTPDmessage_flag_unread | MTPDmessage_flag_out); // unread, out
|
||||
@@ -3250,7 +3250,7 @@ void HistoryWidget::onPhotoUploaded(MsgId newId, const MTPInputFile &file) {
|
||||
if (replyTo) {
|
||||
sendFlags |= MTPmessages_SendMedia::flag_reply_to_msg_id;
|
||||
}
|
||||
hist->sendRequestId = MTP::send(MTPmessages_SendMedia(MTP_int(sendFlags), item->history()->peer->input, MTP_int(replyTo), MTP_inputMediaUploadedPhoto(file), MTP_long(randomId)), App::main()->rpcDone(&MainWidget::sentUpdatesReceived), App::main()->rpcFail(&MainWidget::sendPhotoFailed, randomId), 0, 0, hist->sendRequestId);
|
||||
hist->sendRequestId = MTP::send(MTPmessages_SendMedia(MTP_int(sendFlags), item->history()->peer->input, MTP_int(replyTo), MTP_inputMediaUploadedPhoto(file, MTP_string("")), MTP_long(randomId)), App::main()->rpcDone(&MainWidget::sentUpdatesReceived), App::main()->rpcFail(&MainWidget::sendPhotoFailed, randomId), 0, 0, hist->sendRequestId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3424,6 +3424,7 @@ void HistoryWidget::updateListSize(int32 addToY, bool initial, bool loadedDown,
|
||||
|
||||
if (!isVisible()) {
|
||||
if (initial) _histInited = false;
|
||||
if (resizedItem) _list->recountHeight(true);
|
||||
return; // scrollTopMax etc are not working after recountHeight()
|
||||
}
|
||||
|
||||
@@ -3745,6 +3746,7 @@ void HistoryWidget::gotPreview(QString links, const MTPMessageMedia &result, mtp
|
||||
_previewData = (data->id && data->pendingTill >= 0) ? data : 0;
|
||||
updatePreview();
|
||||
}
|
||||
if (App::main()) App::main()->webPagesUpdate();
|
||||
} else if (result.type() == mtpc_messageMediaEmpty) {
|
||||
_previewCache.insert(links, 0);
|
||||
if (links == _previewLinks && !_previewCancelled) {
|
||||
|
Reference in New Issue
Block a user