2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

optimized enumeration of userpics

This commit is contained in:
John Preston
2016-03-23 14:47:32 +03:00
parent e45de88bd6
commit 02ca81ac64
6 changed files with 76 additions and 34 deletions

View File

@@ -346,6 +346,10 @@ public:
bool updateTyping(uint64 ms, bool force = false);
void clearLastKeyboard();
// optimization for userpics displayed on the left
// if this returns false there is no need to even try to handle them
bool canHaveFromPhotos() const;
typedef QList<HistoryBlock*> Blocks;
Blocks blocks;
@@ -2717,8 +2721,8 @@ protected:
bool updatePinned(bool force = false);
bool updatePinnedText(const QString *pfrom = nullptr, QString *ptext = nullptr);
Text _text;
HistoryMedia *_media;
Text _text = { int(st::msgMinWidth) };
HistoryMedia *_media = nullptr;
int32 _textWidth, _textHeight;
};