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

new gif playing from separate threads

This commit is contained in:
John Preston
2015-12-15 17:50:51 +03:00
parent a66c051eb5
commit 5e0e0d2391
9 changed files with 669 additions and 72 deletions

View File

@@ -74,6 +74,7 @@ namespace {
DocumentItems documentItems;
WebPageItems webPageItems;
SharedContactItems sharedContactItems;
GifItems gifItems;
typedef QMap<HistoryItem*, QMap<HistoryReply*, bool> > RepliesTo;
RepliesTo repliesTo;
@@ -1991,6 +1992,7 @@ namespace App {
::documentItems.clear();
::webPageItems.clear();
::sharedContactItems.clear();
::gifItems.clear();
::repliesTo.clear();
lastPhotos.clear();
lastPhotosMap.clear();
@@ -2425,6 +2427,18 @@ namespace App {
return ::sharedContactItems;
}
void regGifItem(ClipReader *reader, HistoryItem *item) {
::gifItems.insert(reader, item);
}
void unregGifItem(ClipReader *reader) {
::gifItems.remove(reader);
}
const GifItems &gifItems() {
return ::gifItems;
}
QString phoneFromSharedContact(int32 userId) {
SharedContactItems::const_iterator i = ::sharedContactItems.constFind(userId);
if (i != ::sharedContactItems.cend()) {