2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Move background caching to Window::SessionController.

This commit is contained in:
John Preston
2021-08-13 18:39:50 +03:00
parent 1bc5277d51
commit 2667bb3568
5 changed files with 168 additions and 161 deletions

View File

@@ -185,8 +185,6 @@ public:
void searchMessages(const QString &query, Dialogs::Key inChat);
QPixmap cachedBackground(const QRect &forRect, int &x, int &y);
void setChatBackground(
const Data::WallPaper &background,
QImage &&image = QImage());
@@ -299,9 +297,6 @@ private:
void showAll();
void clearHider(not_null<Window::HistoryHider*> instance);
void cacheBackground();
void clearCachedBackground();
[[nodiscard]] auto floatPlayerDelegate()
-> not_null<Media::Player::FloatDelegate*>;
not_null<Ui::RpWidget*> floatPlayerWidget() override;
@@ -389,12 +384,6 @@ private:
int _exportTopBarHeight = 0;
int _contentScrollAddToY = 0;
QPixmap _cachedBackground;
QRect _cachedFor, _willCacheFor;
int _cachedX = 0;
int _cachedY = 0;
base::Timer _cacheBackgroundTimer;
PhotoData *_deletingPhoto = nullptr;
base::flat_map<not_null<PeerData*>, base::flat_set<MsgId>> _viewsIncremented;