Periodically free memory from unused images (#3915)
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
@@ -344,17 +344,17 @@ MessagePtr TwitchMessageBuilder::build()
|
||||
if (this->thread_)
|
||||
{
|
||||
auto &img = getResources().buttons.replyThreadDark;
|
||||
this->emplace<CircularImageElement>(Image::fromPixmap(img, 0.15), 2,
|
||||
Qt::gray,
|
||||
MessageElementFlag::ReplyButton)
|
||||
this->emplace<CircularImageElement>(
|
||||
Image::fromResourcePixmap(img, 0.15), 2, Qt::gray,
|
||||
MessageElementFlag::ReplyButton)
|
||||
->setLink({Link::ViewThread, this->thread_->rootId()});
|
||||
}
|
||||
else
|
||||
{
|
||||
auto &img = getResources().buttons.replyDark;
|
||||
this->emplace<CircularImageElement>(Image::fromPixmap(img, 0.15), 2,
|
||||
Qt::gray,
|
||||
MessageElementFlag::ReplyButton)
|
||||
this->emplace<CircularImageElement>(
|
||||
Image::fromResourcePixmap(img, 0.15), 2, Qt::gray,
|
||||
MessageElementFlag::ReplyButton)
|
||||
->setLink({Link::ReplyToMessage, this->message().id});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user