mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-18 07:07:08 +02:00
Improve phrases in SendFilesBox drag areas.
This commit is contained in:
parent
3dc0e3818b
commit
f10da51517
2 changed files with 7 additions and 4 deletions
Telegram/SourceFiles/boxes
|
@ -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(
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Add table
Reference in a new issue