mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Decrease the amount of clipboard data retrievation
This commit is contained in:
@@ -805,13 +805,13 @@ void SendFilesBox::captionResized() {
|
||||
}
|
||||
|
||||
bool SendFilesBox::canAddFiles(not_null<const QMimeData*> data) const {
|
||||
return (data->hasUrls() && CanAddUrls(base::GetMimeUrls(data))) || data->hasImage();
|
||||
return CanAddUrls(base::GetMimeUrls(data)) || data->hasImage();
|
||||
}
|
||||
|
||||
bool SendFilesBox::addFiles(not_null<const QMimeData*> data) {
|
||||
const auto premium = _controller->session().premium();
|
||||
auto list = [&] {
|
||||
const auto urls = data->hasUrls() ? base::GetMimeUrls(data) : QList<QUrl>();
|
||||
const auto urls = base::GetMimeUrls(data);
|
||||
auto result = CanAddUrls(urls)
|
||||
? Storage::PrepareMediaList(
|
||||
urls,
|
||||
|
Reference in New Issue
Block a user