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

Remove legacy image-related code.

This commit is contained in:
John Preston
2020-05-29 18:08:18 +04:00
parent f066e0f05a
commit 6513422e40
60 changed files with 161 additions and 1509 deletions

View File

@@ -452,25 +452,13 @@ void GifsListWidget::processPanelHideFinished() {
}
void GifsListWidget::clearHeavyData() {
const auto itemForget = [](const auto &item) {
if (const auto document = item->getDocument()) {
document->unload();
}
if (const auto photo = item->getPhoto()) {
photo->unload();
}
if (const auto result = item->getResult()) {
result->unload();
}
item->unloadHeavyPart();
};
// Preserve panel state through visibility toggles.
//clearInlineRows(false);
for (const auto &[document, layout] : _gifLayouts) {
itemForget(layout);
layout->unloadHeavyPart();
}
for (const auto &[document, layout] : _inlineLayouts) {
itemForget(layout);
layout->unloadHeavyPart();
}
}