2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Add items to overviews inside HistoryMedia.

This allows one history item to exist in several media overviews.
See voice message, which should be in VoiceFiles and RoundVoiceFiles.
This commit is contained in:
John Preston
2017-05-18 15:37:06 +03:00
parent 2049f3e55a
commit 2377873c45
8 changed files with 131 additions and 73 deletions

View File

@@ -1347,20 +1347,6 @@ bool MainWidget::preloadOverview(PeerData *peer, MediaOverviewType type) {
return true;
}
void MainWidget::preloadOverviews(PeerData *peer) {
History *h = App::history(peer->id);
bool sending = false;
for (int32 i = 0; i < OverviewCount; ++i) {
auto type = MediaOverviewType(i);
if (type != OverviewChatPhotos && preloadOverview(peer, type)) {
sending = true;
}
}
if (sending) {
MTP::sendAnything();
}
}
void MainWidget::overviewPreloaded(PeerData *peer, const MTPmessages_Messages &result, mtpRequestId req) {
MediaOverviewType type = OverviewCount;
for (int32 i = 0; i < OverviewCount; ++i) {