2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

exif fixed, media overview redesign done

This commit is contained in:
John Preston
2015-12-23 14:13:08 +03:00
parent 5108685123
commit af9908f076
12 changed files with 550 additions and 766 deletions

View File

@@ -465,8 +465,7 @@ void MediaView::step_state(uint64 ms, bool timer) {
if (!_doc->already().isEmpty() && _doc->size < MediaViewImageSizeLimit) {
const FileLocation &location(_doc->location(true));
if (location.accessEnable()) {
QImageReader reader(location.name());
if (reader.canRead()) {
if (QImageReader(location.name()).canRead()) {
displayDocument(_doc, App::histItemById(_msgmigrated ? 0 : _channel, _msgid));
}
location.accessDisable();
@@ -962,8 +961,7 @@ void MediaView::displayDocument(DocumentData *doc, HistoryItem *item) { // empty
_gif = new ClipReader(location, _doc->data);
}
} else {
QImageReader reader(location.name());
if (reader.canRead()) {
if (QImageReader(location.name()).canRead()) {
_current = QPixmap::fromImage(App::readImage(location.name(), 0, false), Qt::ColorOnly);
}
}