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

Allow sending photos larger 1280 (experimental).

Improves #6520.
This commit is contained in:
John Preston
2023-01-02 14:25:44 +04:00
parent 7c537cd787
commit 84288112fc
13 changed files with 67 additions and 27 deletions

View File

@@ -348,8 +348,9 @@ void SendFilesBox::enqueueNextPrepare() {
_list.filesToProcess.pop_front();
const auto weak = Ui::MakeWeak(this);
_preparing = true;
crl::async([weak, file = std::move(file)]() mutable {
Storage::PrepareDetails(file, st::sendMediaPreviewSize);
const auto sideLimit = PhotoSideLimit(); // Get on main thread.
crl::async([weak, sideLimit, file = std::move(file)]() mutable {
Storage::PrepareDetails(file, st::sendMediaPreviewSize, sideLimit);
crl::on_main([weak, file = std::move(file)]() mutable {
if (weak) {
weak->addPreparedAsyncFile(std::move(file));