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

@@ -16,7 +16,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "core/mime_type.h" // Core::IsMimeSticker
#include "core/crash_reports.h" // CrashReports::SetAnnotation
#include "ui/image/image.h"
#include "ui/image/image_source.h" // Images::LocalFileSource
#include "ui/image/image_source.h" // Images::ImageSource
#include "ui/image/image_location_factory.h" // Images::FromPhotoSize
#include "export/export_controller.h"
#include "export/view/export_view_panel_controller.h"
@@ -1080,7 +1080,6 @@ Session::~Session() {
_session->notifications().clearAllFast();
clear();
Images::ClearRemote();
}
template <typename Method>
@@ -3823,10 +3822,8 @@ void Session::setWallpapers(const QVector<MTPWallPaper> &data, int32 hash) {
_wallpapers.push_back(Data::Legacy1DefaultWallPaper());
_wallpapers.back().setLocalImageAsThumbnail(std::make_shared<Image>(
std::make_unique<Images::LocalFileSource>(
qsl(":/gui/art/bg_initial.jpg"),
QByteArray(),
"JPG")));
std::make_unique<Images::ImageSource>(
u":/gui/art/bg_initial.jpg"_q)));
for (const auto &paper : data) {
if (const auto parsed = Data::WallPaper::Create(paper)) {
_wallpapers.push_back(*parsed);
@@ -3838,10 +3835,8 @@ void Session::setWallpapers(const QVector<MTPWallPaper> &data, int32 hash) {
if (defaultFound == end(_wallpapers)) {
_wallpapers.push_back(Data::DefaultWallPaper());
_wallpapers.back().setLocalImageAsThumbnail(std::make_shared<Image>(
std::make_unique<Images::LocalFileSource>(
qsl(":/gui/arg/bg.jpg"),
QByteArray(),
"JPG")));
std::make_unique<Images::ImageSource>(
u":/gui/arg/bg.jpg"_q)));
}
}