mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Cache reaction lottie in Window::SessionController.
This commit is contained in:
@@ -57,6 +57,10 @@ struct CloudTheme;
|
||||
enum class CloudThemeType;
|
||||
} // namespace Data
|
||||
|
||||
namespace HistoryView::Reactions {
|
||||
class CachedIconFactory;
|
||||
} // namespace HistoryView::Reactions
|
||||
|
||||
namespace Window {
|
||||
|
||||
class MainWindow;
|
||||
@@ -450,6 +454,11 @@ public:
|
||||
return _chatStyle.get();
|
||||
}
|
||||
|
||||
[[nodiscard]] auto cachedReactionIconFactory() const
|
||||
-> HistoryView::Reactions::CachedIconFactory & {
|
||||
return *_cachedReactionIconFactory;
|
||||
}
|
||||
|
||||
rpl::lifetime &lifetime() {
|
||||
return _lifetime;
|
||||
}
|
||||
@@ -527,6 +536,9 @@ private:
|
||||
std::deque<std::shared_ptr<Ui::ChatTheme>> _lastUsedCustomChatThemes;
|
||||
rpl::variable<PeerThemeOverride> _peerThemeOverride;
|
||||
|
||||
using ReactionIconFactory = HistoryView::Reactions::CachedIconFactory;
|
||||
std::unique_ptr<ReactionIconFactory> _cachedReactionIconFactory;
|
||||
|
||||
rpl::lifetime _lifetime;
|
||||
|
||||
};
|
||||
|
Reference in New Issue
Block a user