2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +00:00

comments show-hide in channels

This commit is contained in:
John Preston
2015-09-19 12:13:21 +03:00
parent ab7a745a49
commit 56a63a5b10
28 changed files with 1762 additions and 738 deletions

View File

@@ -168,7 +168,10 @@ void ApiWrap::gotReplyTo(ChannelData *channel, const MTPmessages_Messages &msgs,
if (channel) {
channel->ptsReceived(d.vpts.v);
} else {
LOG(("App Error: received messages.channelMessages in ApiWrap::gotReplyTo when no channel was passed!"));
LOG(("App Error: received messages.channelMessages when no channel was passed! (ApiWrap::gotReplyTo)"));
}
if (d.has_collapsed()) { // should not be returned
LOG(("API Error: channels.getMessages and messages.getMessages should not return collapsed groups! (ApiWrap::gotReplyTo)"));
}
App::feedUsers(d.vusers);
@@ -619,7 +622,10 @@ void ApiWrap::gotWebPages(ChannelData *channel, const MTPmessages_Messages &msgs
if (channel) {
channel->ptsReceived(d.vpts.v);
} else {
LOG(("App Error: received messages.channelMessages in ApiWrap::gotWebPages when no channel was passed!"));
LOG(("API Error: received messages.channelMessages when no channel was passed! (ApiWrap::gotWebPages)"));
}
if (d.has_collapsed()) { // should not be returned
LOG(("API Error: channels.getMessages and messages.getMessages should not return collapsed groups! (ApiWrap::gotWebPages)"));
}
App::feedUsers(d.vusers);
@@ -641,7 +647,7 @@ void ApiWrap::gotWebPages(ChannelData *channel, const MTPmessages_Messages &msgs
MainWidget *m = App::main();
for (QMap<uint64, int32>::const_iterator i = msgsIds.cbegin(), e = msgsIds.cend(); i != e; ++i) {
HistoryItem *item = App::histories().addToBack(v->at(i.value()), -1);
HistoryItem *item = App::histories().addNewMessage(v->at(i.value()), -1);
if (item) {
item->initDimensions();
if (m) m->itemResized(item);