2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-01 06:55:58 +00:00

Don't unload all media on switching between chats.

This commit is contained in:
John Preston
2018-10-23 16:57:43 +04:00
parent 959859f57c
commit 8e7117fa22
21 changed files with 61 additions and 83 deletions

View File

@@ -2589,9 +2589,9 @@ void MediaView::preloadData(int delta) {
auto forgetIndex = *_index - delta * 2;
auto entity = entityByIndex(forgetIndex);
if (auto photo = base::get_if<not_null<PhotoData*>>(&entity.data)) {
(*photo)->forget();
(*photo)->unload();
} else if (auto document = base::get_if<not_null<DocumentData*>>(&entity.data)) {
(*document)->forget();
(*document)->unload();
}
}