mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-04 08:35:21 +00:00
Fix pasting of an image with attached URL data.
Regression was introduced in db5d599052
.
Fixes #7794.
This commit is contained in:
@@ -4467,6 +4467,8 @@ bool HistoryWidget::confirmSendingFiles(
|
|||||||
bool HistoryWidget::canSendFiles(not_null<const QMimeData*> data) const {
|
bool HistoryWidget::canSendFiles(not_null<const QMimeData*> data) const {
|
||||||
if (!canWriteMessage()) {
|
if (!canWriteMessage()) {
|
||||||
return false;
|
return false;
|
||||||
|
} else if (data->hasImage()) {
|
||||||
|
return true;
|
||||||
} else if (const auto urls = data->urls(); !urls.empty()) {
|
} else if (const auto urls = data->urls(); !urls.empty()) {
|
||||||
if (ranges::find_if(
|
if (ranges::find_if(
|
||||||
urls,
|
urls,
|
||||||
@@ -4474,8 +4476,6 @@ bool HistoryWidget::canSendFiles(not_null<const QMimeData*> data) const {
|
|||||||
) == urls.end()) {
|
) == urls.end()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} else if (data->hasImage()) {
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user