mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
pausing gifs when mediaview is opened, improved photos handling - download on click if autoload disabled
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
Reference in New Issue
Block a user