Try to reduce memory usage by reusing avatar pixmaps
This commit is contained in:
parent
89015b9f18
commit
52056a79fa
27 changed files with 149 additions and 208 deletions
|
|
@ -1830,10 +1830,7 @@ Cache::searchRooms(const std::string &query, std::uint8_t max_items)
|
|||
|
||||
std::vector<RoomSearchResult> results;
|
||||
for (auto it = items.begin(); it != end; it++) {
|
||||
results.push_back(
|
||||
RoomSearchResult{it->second.first,
|
||||
it->second.second,
|
||||
QImage::fromData(image(txn, it->second.second.avatar_url))});
|
||||
results.push_back(RoomSearchResult{it->second.first, it->second.second});
|
||||
}
|
||||
|
||||
txn.commit();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue