mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +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 {
|
||||
if (!canWriteMessage()) {
|
||||
return false;
|
||||
} else if (data->hasImage()) {
|
||||
return true;
|
||||
} else if (const auto urls = data->urls(); !urls.empty()) {
|
||||
if (ranges::find_if(
|
||||
urls,
|
||||
@@ -4474,8 +4476,6 @@ bool HistoryWidget::canSendFiles(not_null<const QMimeData*> data) const {
|
||||
) == urls.end()) {
|
||||
return true;
|
||||
}
|
||||
} else if (data->hasImage()) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user