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

pausing gifs when mediaview is opened, improved photos handling - download on click if autoload disabled

This commit is contained in:
John Preston
2015-12-25 16:09:14 +03:00
parent edb2a9d5f6
commit a5622cfe3b
20 changed files with 418 additions and 349 deletions

View File

@@ -69,6 +69,7 @@ namespace {
typedef QMap<ChannelId, ReplyMarkups> ChannelReplyMarkups;
ChannelReplyMarkups channelReplyMarkups;
PhotoItems photoItems;
VideoItems videoItems;
AudioItems audioItems;
DocumentItems documentItems;
@@ -1959,6 +1960,7 @@ namespace App {
cSetStickerSetsOrder(StickerSetsOrder());
cSetLastStickersUpdate(0);
cSetReportSpamStatuses(ReportSpamStatuses());
::photoItems.clear();
::videoItems.clear();
::audioItems.clear();
::documentItems.clear();
@@ -2348,6 +2350,18 @@ namespace App {
return result;
}
void regPhotoItem(PhotoData *data, HistoryItem *item) {
::photoItems[data].insert(item, NullType());
}
void unregPhotoItem(PhotoData *data, HistoryItem *item) {
::photoItems[data].remove(item);
}
const PhotoItems &photoItems() {
return ::photoItems;
}
void regVideoItem(VideoData *data, HistoryItem *item) {
::videoItems[data].insert(item, NullType());
}