diff --git a/Telegram/SourceFiles/boxes/edit_caption_box.cpp b/Telegram/SourceFiles/boxes/edit_caption_box.cpp index 90a989ce7..4a2b53c5f 100644 --- a/Telegram/SourceFiles/boxes/edit_caption_box.cpp +++ b/Telegram/SourceFiles/boxes/edit_caption_box.cpp @@ -622,9 +622,10 @@ void EditCaptionBox::setupDragArea() { }; // Avoid both drag areas appearing at one time. auto computeState = [=](const QMimeData *data) { + using DragState = Storage::MimeDataState; const auto state = Storage::ComputeMimeDataState(data); - return (state == Storage::MimeDataState::PhotoFiles) - ? Storage::MimeDataState::Image + return (state == DragState::PhotoFiles || state == DragState::Image) + ? (_asFile ? DragState::Files : DragState::Image) : state; }; const auto areas = DragArea::SetupDragAreaToContainer( diff --git a/Telegram/SourceFiles/boxes/send_files_box.cpp b/Telegram/SourceFiles/boxes/send_files_box.cpp index dcab2b97c..46ac4b111 100644 --- a/Telegram/SourceFiles/boxes/send_files_box.cpp +++ b/Telegram/SourceFiles/boxes/send_files_box.cpp @@ -442,8 +442,10 @@ void SendFilesBox::setupDragArea() { auto computeState = [=](const QMimeData *data) { using DragState = Storage::MimeDataState; const auto state = Storage::ComputeMimeDataState(data); - return (state == DragState::PhotoFiles) - ? DragState::Image + return (state == DragState::PhotoFiles || state == DragState::Image) + ? (_sendWay.current().sendImagesAsPhotos() + ? DragState::Image + : DragState::Files) : state; }; const auto areas = DragArea::SetupDragAreaToContainer(