2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-30 22:25:12 +00:00

Updated TDesktop sources to 3.3

This commit is contained in:
RadRussianRus
2021-12-07 19:18:08 +03:00
581 changed files with 9855 additions and 5023 deletions

View File

@@ -1084,13 +1084,19 @@ bool DocumentData::isStickerSetInstalled() const {
}
}
Image *DocumentData::getReplyPreview(Data::FileOrigin origin) {
Image *DocumentData::getReplyPreview(
Data::FileOrigin origin,
not_null<PeerData*> context) {
if (!hasThumbnail()) {
return nullptr;
} else if (!_replyPreview) {
_replyPreview = std::make_unique<Data::ReplyPreview>(this);
}
return _replyPreview->image(origin);
return _replyPreview->image(origin, context);
}
Image *DocumentData::getReplyPreview(not_null<HistoryItem*> item) {
return getReplyPreview(item->fullId(), item->history()->peer);
}
bool DocumentData::replyPreviewLoaded() const {
@@ -1158,12 +1164,14 @@ bool DocumentData::useStreamingLoader() const {
|| isVoiceMessage();
}
bool DocumentData::canBeStreamed() const {
bool DocumentData::canBeStreamed(HistoryItem *item) const {
// Streaming couldn't be used with external player
// Maybe someone brave will implement this once upon a time...
return hasRemoteLocation()
&& supportsStreaming()
&& (!cUseExternalVideoPlayer() || !isVideoFile());
&& (!isVideoFile()
|| !cUseExternalVideoPlayer()
|| (item && !item->allowsForward()));
}
void DocumentData::setInappPlaybackFailed() {