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

Remove corner download if noforwards.

This commit is contained in:
John Preston
2021-11-05 22:32:26 +04:00
parent 96c910190b
commit c849d17667
13 changed files with 59 additions and 50 deletions

View File

@@ -1158,12 +1158,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->history()->peer->allowsForwarding()));
}
void DocumentData::setInappPlaybackFailed() {