mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-01 15:15:13 +00:00
Moved searching of sticker mimes to single place.
This commit is contained in:
@@ -13,6 +13,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "mainwidget.h"
|
||||
#include "api/api_text_entities.h"
|
||||
#include "core/application.h"
|
||||
#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
|
||||
@@ -2390,8 +2391,7 @@ not_null<DocumentData*> Session::processDocument(
|
||||
case mtpc_document: {
|
||||
const auto &fields = data.c_document();
|
||||
const auto mime = qs(fields.vmime_type());
|
||||
const auto format = (mime == qstr("image/webp")
|
||||
|| mime == qstr("application/x-tgsticker"))
|
||||
const auto format = Core::IsMimeSticker(mime)
|
||||
? "WEBP"
|
||||
: "JPG";
|
||||
return document(
|
||||
|
Reference in New Issue
Block a user