2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Decrease the amount of clipboard data retrievation

This commit is contained in:
Ilya Fedin
2022-09-26 02:52:59 +04:00
committed by John Preston
parent 073c1a4d0f
commit 16669402cf
3 changed files with 17 additions and 18 deletions

View File

@@ -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,