Try to reduce memory usage by reusing avatar pixmaps

This commit is contained in:
Nicolas Werner 2019-08-26 01:24:56 +02:00
parent 89015b9f18
commit 52056a79fa
27 changed files with 149 additions and 208 deletions

View file

@ -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();