mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 14:45:14 +00:00
@@ -110,8 +110,8 @@ std::unique_ptr<Result> Result::create(uint64 queryId, const MTPBotInlineResult
|
||||
message = &r.vsend_message;
|
||||
} break;
|
||||
}
|
||||
auto badAttachment = (result->_photo && result->_photo->full->isNull())
|
||||
|| (result->_document && !result->_document->isValid());
|
||||
auto badAttachment = (result->_photo && result->_photo->isNull())
|
||||
|| (result->_document && result->_document->isNull());
|
||||
|
||||
if (!message) {
|
||||
return nullptr;
|
||||
@@ -246,11 +246,10 @@ std::unique_ptr<Result> Result::create(uint64 queryId, const MTPBotInlineResult
|
||||
|
||||
bool Result::onChoose(Layout::ItemBase *layout) {
|
||||
if (_photo && _type == Type::Photo) {
|
||||
if (_photo->medium->loaded() || _photo->thumb->loaded()) {
|
||||
if (_photo->thumbnail()->loaded()) {
|
||||
return true;
|
||||
} else if (!_photo->medium->loading()) {
|
||||
_photo->thumb->loadEvenCancelled(Data::FileOrigin());
|
||||
_photo->medium->loadEvenCancelled(Data::FileOrigin());
|
||||
} else if (!_photo->thumbnail()->loading()) {
|
||||
_photo->thumbnail()->loadEvenCancelled(Data::FileOrigin());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user